Stackbit's shareable config for ESLint
npm install @stackbit/eslint-configStackbit's shareable config for ESLint
Install ESLint and @stackbit/eslint-config:
```
npm install --save-dev eslint @stackbit/eslint-config
@stackbit/eslint-config should be used in conjunction with Prettier. See the @stackbit/prettier-config installation guide for more details.
. To enable these rules, add an eslintConfig property in your package.json. See the ESLint configuration docs for more details.`json
"eslintConfig": {
"extends": ["@stackbit"]
}
`Now you can run ESLint by adding the following scripts to your
package.json. See the ESLint CLI docs for more details.`json
"scripts": {
"lint:js": "eslint --cache --ext .js,.jsx .",
"format:js": "npm run lint:js -- --fix"
}
`Lint it:
`
npm run lint:js
`Format it:
`
npm run format:js
``