@fixter/eslint-config-react
Common eslint rules to use with all of our React projects.
Install
npm i -D @fixter/eslint-config-react
Usage
.eslintrc
{
"extends": ["@fixter/eslint-config-react"],
"rules": {
"no-eval": 0
}
}
TypeScript & JavaScript in the same project
This config is mainly for TS and to have it working alonside JS add the following in .eslintrc
:
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json"
},
Also if you want to customize some rules based on language add this:
"overrides": [
{
// disable TS rules for JS
"files": ["**/*.js"],
"parser": "@typescript-eslint/parser",
"rules": {
"@typescript-eslint/no-var-requires": "off"
}
}
]