eslint-config-ezcater-react
v6.0.0
Published
The style config for ezCater's React codebases
Downloads
3,041
Readme
eslint-config-ezcater-react
Usage
Package extends our base ESLint rules, and includes rules for React, JSX, and Jest.
- Install the package as a dev dependency for your project:
npm i eslint-config-ezcater-react --save-dev
- Add
ezcater-react
to theextends
section of your project's.eslintrc
:
extends: ['ezcater-react'],
- Add optional scripts to your
package.json
to run linting checks:
"scripts": {
"fix:lint": "eslint . --fix",
"validate:lint": "eslint .",
}
- ESLint is configured here to run Prettier along with the other linting rules. But if your text editor supports a Prettier integration, you will probably need to copy the rules in
./rules/prettier.js
into a.prettierrc
in your project's root directory:
...in .prettierrc
{
"singleQuote": true,
"printWidth": 100,
"trailingComma": "es5",
etc...
}