Shared ESLint config for JavaScript code produced by VizEat's Team.
it contains generic rules for all JS projects (back & front)
it extends vizeat
config and add JSX / React specific rules
At VizEat we use eslint
and a config based on eslint-config-standard
to lint our code and eslint-prettier
to format it.
Here is how you can set it up to easily get up and running:
yarn add --dev eslint-config-vizeat eslint-plugin-import eslint-plugin-node eslint-plugin-promise babel-eslint eslint
Then, extend vizeat
or vizeat/react
in your .eslintrc
depending on the kind of projects you're working on.
vizeat/react
extends vizeat
config so for mixed projects (React + SSR) vizeat/react
is enough.
{ "extends": ["vizeat"] }
or
{ "extends": ["vizeat/react"] }
At VizEat we also use prettier-eslint-cli
yarn add --dev prettier-eslint-cli
And setup helper script in our package.json
:
"scripts": {
"lint": "eslint ./",
"fmt": "prettier-eslint \"{./*@(.js|.jsx),./!(node_modules|build|dist)/**/*@(.js|.jsx)}\" --write"
}
Happy hacking !