1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2024-12-22 12:50:36 +01:00
CanvasBlocker/.eslintrc.json
2019-12-24 00:32:50 +01:00

93 lines
2.2 KiB
JSON

{
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"webextensions": true
},
"parserOptions": {
"ecmaVersion": 8,
"ecmaFeatures": {
"jsx": true
},
"sourceType": "script"
},
"plugins": [
"promise",
"eslint-comments",
"html"
],
"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],
"consistent-return": "error",
"constructor-super": "warn",
"eqeqeq": "error",
"eslint-comments/no-use": ["error", {"allow": ["eslint-disable-next-line"]}],
"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}],
"no-useless-rename": "warn",
"no-useless-return": "warn",
"no-var": "error",
"quotes": ["error", "double"],
"require-atomic-updates": "off",
"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"
}
},
{
"files": ["test/*"],
"rules": {
"no-console": "off"
}
},
{
"files": [".tools/*.js"],
"env": {
"node": true
},
"rules": {
"no-console": "off"
}
},
{
"files": ["*.html", "*.php"],
"rules": {
"no-useless-escape": "off",
"no-undef": "off"
}
}
]
}