Custom ESLint rules
Rules are based on @rushstack/eslint-config
Installation
npm i -D @kevinbai/lint-rules
.eslintrc
Add Choose the appropriate profile depending on the project
// .eslintrc
{
"extends": "./node_modules/@kevinbai/lint-rules/onde/.eslintrc.js"
}
.prettierrc
Add //.prettierrc
"@kevinbai/lint-rules/.prettierrc.json"
Add .eslintignore
node_modules
...any other files
package.json
Add lint script to {
"scripts": {
"lint": "eslint . --fix"
}
}
// or eslint src --fix
Profiles
- Node:
@kevinbai/lint-rules/node/.eslintrc.js
- React:
@kevinbai/lint-rules/react/.eslintrc.js