2017-09-24 00:11:16 +02:00
|
|
|
{
|
2019-11-28 01:26:35 +01:00
|
|
|
"env": {
|
|
|
|
"browser": true,
|
|
|
|
"commonjs": true,
|
|
|
|
"es6": true,
|
|
|
|
"webextensions": true
|
|
|
|
},
|
|
|
|
"parserOptions": {
|
2019-11-30 02:05:37 +01:00
|
|
|
"ecmaVersion": 8,
|
2019-11-28 01:26:35 +01:00
|
|
|
"ecmaFeatures": {
|
|
|
|
"jsx": true
|
|
|
|
},
|
|
|
|
"sourceType": "script"
|
|
|
|
},
|
2019-11-30 02:05:37 +01:00
|
|
|
"plugins": [
|
|
|
|
"promise",
|
|
|
|
"eslint-comments",
|
|
|
|
"html"
|
|
|
|
],
|
2019-11-28 01:26:35 +01:00
|
|
|
"extends": [
|
|
|
|
"eslint:recommended",
|
|
|
|
"plugin:promise/recommended",
|
|
|
|
"plugin:eslint-comments/recommended"
|
|
|
|
],
|
|
|
|
"globals": {
|
|
|
|
"exportFunction": false
|
|
|
|
},
|
|
|
|
"rules": {
|
|
|
|
"brace-style": ["error", "stroustrup", {"allowSingleLine": true}],
|
|
|
|
"comma-spacing": ["error", { "before": false, "after": true }],
|
|
|
|
"complexity": ["warn", 20],
|
2019-12-01 01:25:39 +01:00
|
|
|
"consistent-return": "error",
|
2019-11-28 01:26:35 +01:00
|
|
|
"constructor-super": "warn",
|
|
|
|
"eqeqeq": "error",
|
2020-01-06 15:15:04 +01:00
|
|
|
"eslint-comments/no-use": ["error", {"allow": ["eslint-disable-next-line", "globals"]}],
|
2019-11-28 01:26:35 +01:00
|
|
|
"indent": ["error", "tab", {"SwitchCase": 1}],
|
|
|
|
"max-depth": ["warn", 4],
|
|
|
|
"max-len": ["warn", {"code": 120, "tabWidth": 4}],
|
|
|
|
"max-lines-per-function": ["warn", {"max": 80,"skipBlankLines": true, "skipComments": true}],
|
|
|
|
"max-lines": ["warn", {"max": 500, "skipBlankLines": true, "skipComments": true}],
|
|
|
|
"max-params": ["warn", 4],
|
|
|
|
"no-console": "error",
|
|
|
|
"no-const-assign": "error",
|
|
|
|
"no-inner-declarations": "warn",
|
|
|
|
"no-mixed-spaces-and-tabs": ["error", "smart-tabs"],
|
|
|
|
"no-prototype-builtins": "off",
|
|
|
|
"no-this-before-super": "warn",
|
|
|
|
"no-trailing-spaces": ["error", {"skipBlankLines": true}],
|
|
|
|
"no-undef": "error",
|
|
|
|
"no-unreachable": "warn",
|
|
|
|
"no-unused-vars": "off",
|
|
|
|
"no-use-before-define": ["error", {"functions": false}],
|
2019-12-10 15:07:22 +01:00
|
|
|
"no-useless-rename": "warn",
|
2019-12-24 00:32:50 +01:00
|
|
|
"no-useless-return": "warn",
|
2019-11-28 01:26:35 +01:00
|
|
|
"no-var": "error",
|
|
|
|
"quotes": ["error", "double"],
|
2019-12-16 19:27:28 +01:00
|
|
|
"require-atomic-updates": "off",
|
2019-11-28 01:26:35 +01:00
|
|
|
"semi": ["error", "always"],
|
|
|
|
"space-in-parens": ["error", "never"],
|
|
|
|
"strict": ["error", "function"],
|
|
|
|
"valid-typeof": "warn"
|
|
|
|
},
|
|
|
|
"overrides": [
|
|
|
|
{
|
|
|
|
"files": ["detectionTest.js", "modifiedCanvasAPI.js", "options.js", "settingsDisplay.js"],
|
|
|
|
"rules": {
|
|
|
|
"max-lines": "off"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2019-11-30 02:05:37 +01:00
|
|
|
"files": ["test/*"],
|
|
|
|
"rules": {
|
|
|
|
"no-console": "off"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"files": [".tools/*.js"],
|
|
|
|
"env": {
|
|
|
|
"node": true
|
|
|
|
},
|
|
|
|
"rules": {
|
|
|
|
"no-console": "off"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"files": ["*.html", "*.php"],
|
2019-11-28 01:26:35 +01:00
|
|
|
"rules": {
|
2019-11-30 02:05:37 +01:00
|
|
|
"no-useless-escape": "off",
|
|
|
|
"no-undef": "off"
|
2019-11-28 01:26:35 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
2017-09-24 00:11:16 +02:00
|
|
|
}
|