retropilot-client/.eslintrc.json

53 lines
1.6 KiB
JSON
Raw Normal View History

2022-01-05 15:51:23 -07:00
{
2022-01-09 09:52:29 -07:00
"env": {
"browser": true,
"es6": true
},
2022-01-05 15:51:23 -07:00
"extends": [
"react-app",
2022-01-09 09:52:29 -07:00
"react-app/jest",
"airbnb",
"airbnb/hooks"
2022-01-07 10:35:31 -07:00
],
"rules": {
2022-01-09 09:52:29 -07:00
// disallow use of unary operators, ++ and --
2022-01-09 16:00:37 -07:00
// https://eslint.org/docs/rules/no-plusplus
2022-01-09 09:52:29 -07:00
// 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
2022-01-09 16:00:37 -07:00
// https://eslint.org/docs/rules/no-use-before-define
2022-01-09 09:52:29 -07:00
// 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
2022-01-09 09:56:30 -07:00
}],
2022-03-23 18:38:30 -06:00
// 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 }],
2022-01-09 16:00:37 -07:00
// 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",
2022-01-09 09:56:30 -07:00
// TODO: fix and remove
"no-console": "off"
2022-01-07 10:35:31 -07:00
}
2022-01-05 15:51:23 -07:00
}