-
Notifications
You must be signed in to change notification settings - Fork 87
/
.eslintrc.json
93 lines (93 loc) · 2.23 KB
/
.eslintrc.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
{
"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", "globals"]}],
"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"
}
}
]
}