53 lines
1.6 KiB
JSON
53 lines
1.6 KiB
JSON
{
|
|
"env": {
|
|
"browser": true,
|
|
"es6": true
|
|
},
|
|
"extends": [
|
|
"react-app",
|
|
"react-app/jest",
|
|
"airbnb",
|
|
"airbnb/hooks"
|
|
],
|
|
"rules": {
|
|
// disallow use of unary operators, ++ and --
|
|
// https://eslint.org/docs/rules/no-plusplus
|
|
// retropilot: we allow them in the for loop
|
|
"no-plusplus": ["error", { "allowForLoopAfterthoughts": true }],
|
|
|
|
// disallow use of the continue statement
|
|
// https://eslint.org/docs/rules/no-continue
|
|
// retropilot: we allow use of the continue statement
|
|
"no-continue": "off",
|
|
|
|
// disallow use of variables before they are defined
|
|
// https://eslint.org/docs/rules/no-use-before-define
|
|
// retropilot: permit referencing functions before they're defined
|
|
"no-use-before-define": ["error", { "functions": false }],
|
|
|
|
// specify the maximum length of a line in your program
|
|
// https://eslint.org/docs/rules/max-len
|
|
// retropilot: ignore comments
|
|
"max-len": ["error", 100, 2, {
|
|
"ignoreUrls": true,
|
|
"ignoreComments": true,
|
|
"ignoreRegExpLiterals": true,
|
|
"ignoreStrings": true,
|
|
"ignoreTemplateLiterals": true
|
|
}],
|
|
|
|
// disallow else after a return in an if
|
|
// https://eslint.org/docs/rules/no-else-return
|
|
// retropilot: allow else-if...
|
|
"no-else-return": ["error", { "allowElseIf": true }],
|
|
|
|
// restrict file extensions that may contain JSX
|
|
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-filename-extension.md
|
|
// retropilot: we don't care about this
|
|
"react/jsx-filename-extension": "off",
|
|
|
|
// TODO: fix and remove
|
|
"no-console": "off"
|
|
}
|
|
}
|