Skip to content

Latest commit

 

History

History
53 lines (34 loc) · 1.27 KB

README.md

File metadata and controls

53 lines (34 loc) · 1.27 KB

Shareable Eslint Config by the VizEat Team

Shared ESLint config for JavaScript code produced by VizEat's Team.

vizeat config

it contains generic rules for all JS projects (back & front)

vizeat/react config

it extends vizeat config and add JSX / React specific rules

Usage

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"] }

Going further

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 !