Optional - Set format on save and any global prettier options
npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-plugin-html eslint-config-node
Optional - Set format on save and any global prettier options
npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-plugin-html eslint-config-node
FROM php:7.2.10-apache-stretch | |
RUN apt-get update -yqq && \ | |
apt-get install -y apt-utils zip unzip && \ | |
apt-get install -y nano && \ | |
apt-get install -y libzip-dev && \ | |
a2enmod rewrite && \ | |
docker-php-ext-install pdo pdo_mysql && \ | |
docker-php-ext-configure zip --with-libzip && \ | |
docker-php-ext-install zip && \ |
# [<tag>] (If applied, this commit will...) <subject> (Max 72 char) | |
# |<---- Preferably using up to 50 chars --->|<------------------->| | |
# Example: | |
# [feat] Implement automated commit messages | |
# (Optional) Explain why this change is being made | |
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->| | |
# (Optional) Provide links or keys to any relevant tickets, articles or other resources | |
# Example: Github issue #23 |
/^[a-zA-Z0-9_.+-]+@(?:(?:[a-zA-Z0-9-]+.)?[a-zA-Z]+.)?(domain.com|domain.net)$/g |
import React from "react" | |
import { Route, Switch } from "react-router-dom" | |
const AppRoute = ({ component: Component, layout: Layout, ...rest }) => ( | |
<Route {...rest} render={props => ( | |
<Layout> | |
<Component {...props} /> | |
</Layout> | |
)} /> | |
) |
Steps: | |
1. Install Eslint Globally | |
npm i -g eslint | |
2. Open your create-react-app react project or create one by typing | |
npx create-react-app name-of-project | |
(needs npm 5.2+) | |
3. Initiate Eslint in your project: | |
eslint --init |
import React from 'react'; | |
import { | |
Container, | |
Header, | |
Content, | |
Footer, | |
FooterTab, | |
Button, | |
Icon, | |
Text, |
function downloadImage(data, filename = 'untitled.jpeg') { | |
var a = document.createElement('a'); | |
a.href = data; | |
a.download = filename; | |
document.body.appendChild(a); | |
a.click(); | |
} | |
document.getElementById('btn-download').addEventListener("click", function(e) { | |
const canvas = document.createElement('canvas'); |