2022-01-08 13:15:02 -07:00
|
|
|
{
|
|
|
|
"extends": [
|
|
|
|
"airbnb-base"
|
|
|
|
],
|
|
|
|
"env": {
|
|
|
|
"es6": true,
|
2022-01-08 13:41:18 -07:00
|
|
|
"node": true,
|
2022-01-08 21:31:42 -07:00
|
|
|
"browser": false // do we need this? none of this code will ever run on a browswer
|
2022-01-08 13:15:02 -07:00
|
|
|
},
|
|
|
|
"rules": {
|
2022-01-08 13:47:52 -07:00
|
|
|
// disallow use of unary operators, ++ and --
|
|
|
|
// http://eslint.org/docs/rules/no-plusplus
|
2022-01-08 15:23:08 -07:00
|
|
|
// retropilot: we allow them in the for loop
|
2022-01-08 13:47:52 -07:00
|
|
|
"no-plusplus": ["error", { "allowForLoopAfterthoughts": true }],
|
2022-01-08 15:23:08 -07:00
|
|
|
|
|
|
|
// disallow use of the continue statement
|
|
|
|
// https://eslint.org/docs/rules/no-continue
|
|
|
|
// retropilot: we allow use of the continue statement
|
2022-01-08 14:49:57 -07:00
|
|
|
"no-continue": "off",
|
2022-01-08 13:47:52 -07:00
|
|
|
|
2022-01-08 15:32:22 -07:00
|
|
|
// disallow use of variables before they are defined
|
|
|
|
// http://eslint.org/docs/rules/no-use-before-define
|
|
|
|
// retropilot: permit referencing functions before they're defined
|
|
|
|
"no-use-before-define": ["error", { "functions": false }],
|
|
|
|
|
2022-01-08 17:57:15 -07:00
|
|
|
// 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-08 13:41:18 -07:00
|
|
|
// TODO: fix and remove
|
2022-01-08 15:32:22 -07:00
|
|
|
// retropilot: we are in the process of removing all of these
|
2022-01-08 13:41:18 -07:00
|
|
|
"no-unused-vars": ["warn", { "vars": "all", "args": "after-used", "ignoreRestSiblings": true }],
|
2022-01-08 15:32:22 -07:00
|
|
|
// retropilot: we are in the process of moving to es6 let and const
|
2022-01-08 13:55:41 -07:00
|
|
|
"no-var": "off",
|
|
|
|
"one-var": "off",
|
2022-01-08 14:30:52 -07:00
|
|
|
"no-await-in-loop": "off",
|
2022-01-08 15:23:08 -07:00
|
|
|
"no-console": "off",
|
2022-01-08 15:32:22 -07:00
|
|
|
"no-underscore-dangle": "off",
|
|
|
|
// retropilot: we use this for websocket connection properties
|
|
|
|
"no-param-reassign": "off"
|
2022-01-08 13:15:02 -07:00
|
|
|
}
|
|
|
|
}
|