If you are using eslint-loader in your build config don't forget to check the last version it supports. For example, webpack 4 eslint-loader supports eslint up to version 7, so install ^eslint7.0.0:
yarn add -D @i-novus/eslint-config eslint
- Add
.eslintrc
to the project root. Base config suits for node project usage
{
"extends": ["@i-novus/eslint-config"]
// or "extends": ["@i-novus/eslint-config/node"]
}
If you want to use this config in React project, you have to extend it from /react import path
{
"extends": ["@i-novus/eslint-config/react"]
}
- Add script to
package.json
{
"scripts": {
"lint": "eslint src/ --fix"
}
}