forked from comozilla/parapara-canvas-editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
202 lines (202 loc) · 5.77 KB
/
.eslintrc.js
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
module.exports = {
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": true,
"mocha": true
},
"extends": "eslint:recommended",
"parserOptions": {
"sourceType": "module"
},
"rules": {
"accessor-pairs": "error",
"array-bracket-spacing": ["warn", "never"],
"array-callback-return": "error",
"block-scoped-var": "error",
"block-spacing": ["error", "always"],
"brace-style": ["error", "1tbs", { "allowSingleLine": true }],
"camelcase": ["off", { "properties": "always" }],
"comma-dangle": "error",
"comma-spacing": ["error", {
"before": false,
"after": true
}],
"comma-style": ["error", "last", {
"exceptions": {}
}],
"complexity": ["warn", 3],
"computed-property-spacing": ["error", "never"],
"consistent-this": "off",
"consistent-return": "error",
"curly": "error",
"default-case": "error",
"dot-location": ["error", "property"],
"dot-notation": "off",
"eol-last": "error",
"eqeqeq": ["error", "smart"],
"func-names": "off",
"func-style": ["off", "expression"],
"guard-for-in": "error",
"indent": ["error", 2],
"init-declarations": "off",
"key-spacing": ["error", {
"beforeColon": false,
"afterColon": true
}],
"keyword-spacing": ["error", {
"before": false,
"after": true,
"overrides": {
"else": { "before": true },
"throw": { "before": true }
}
}],
"linebreak-style": ["error", "unix"],
"lines-around-comment": "error",
"max-depth": ["warn", 4],
"max-len": ["error", 80, 4, { "ignoreUrls": true }],
"max-nested-callbacks": ["warn", 3],
"max-statements-per-line": ["warn", {
"max": 3
}],
"new-cap": "error",
"new-parens": "error",
"newline-after-var": ["off", "always"],
"newline-before-return": "warn",
"newline-per-chained-call": ["error", {
"ignoreChainWithDepth": 3
}],
"no-alert": "warn",
"no-array-constructor": "error",
"no-bitwise": "warn",
"no-catch-shadow": "error",
"no-continue": "warn",
"no-underscore-dangle": ["error", {
"allowAfterThis": true
}],
"no-inline-comments": "warn",
"no-extra-semi": "error",
"no-extra-boolean-cast": "error",
"no-extra-parens": "error",
"no-ex-assign": "error",
"no-fallthrough": "warn",
"no-floating-decimal": "error",
"no-func-assign": "error",
"no-inner-declarations": "warn",
"no-implicit-coercion": "error",
"no-implicit-globals": "warn",
"no-implied-eval": "error",
"no-invalid-this": "error",
"no-invalid-regexp": "error",
"no-irregular-whitespace": "error",
"no-iterator": "error",
"no-label-var": "error",
"no-lone-blocks": "error",
"no-lonely-if": "error",
"no-loop-func": "error",
"no-magic-numbers": ["warn", {
"ignoreArrayIndexes": true,
"detectObjects": true
}],
"no-mixed-spaces-and-tabs": "error",
"no-multiple-empty-lines": ["error", {
"max": 2
}],
"no-multi-spaces": "error",
"no-multi-str": "error",
"no-negated-condition": "warn",
"no-negated-in-lhs": "warn",
"no-native-reassign": "error",
"no-new": "error",
"no-new-func": "error",
"no-new-object": "error",
"no-octal": "error",
"no-octal-escape": "error",
"no-param-reassign": "error",
"no-plusplus": ["warn", {
"allowForLoopAfterthoughts": true
}],
"no-proto": "error",
"no-labels": "error",
"no-obj-calls": "error",
"no-redeclare": "error",
"no-restricted-globals": "off",
"no-return-assign": "error",
"no-script-url": "error",
"no-self-assign": "error",
"no-self-compare": "error",
"no-sequences": "error",
"no-shadow": ["error", {
"builtinGlobals": false,
"hoist": "functions",
"allow": []
}],
"no-shadow-restricted-names": "error",
"no-sparse-arrays": "error",
"no-spaced-func": "error",
"no-ternary": "off",
"no-throw-literal": "error",
"no-trailing-spaces": "error",
"no-undef": "error",
"no-undef-init": "error",
"no-undefined": "error",
"no-unexpected-multiline": "error",
"no-unmodified-loop-condition": "error",
"no-unneeded-ternary": "error",
"no-unused-expressions": ["error", {
"allowTernary": true,
"allowShortCircuit": true
}],
"no-unreachable": "error",
"no-unused-labels": "error",
"no-unused-vars": "warn",
"no-use-before-define": ["error", {
"functions": false,
"classes": false
}],
"no-useless-call": "error",
"no-useless-concat": "error",
"no-useless-escape": "error",
"no-var": "warn",
"no-void": "error",
"no-warning-comments": "off",
"no-whitespace-before-property": "error",
"no-with": "error",
"object-curly-spacing": ["error", "always"],
"one-var": "off",
"one-var-declaration-per-line": ["warn", "always"],
"operator-assignment": ["warn", "always"],
"operator-linebreak": ["error", "after"],
"padded-blocks": ["off", "never"],
"quote-props": ["error", "consistent-as-needed", {
"keywords": true
}],
"quotes": ["error", "double"],
"radix": ["error", "as-needed"],
"spaced-comment": ["error", "always"],
"semi": ["error", "always"],
"semi-spacing": ["warn", {
"before": false, "after": true
}],
"sort-vars": ["off", {
"ignoreCase": true
}],
"space-before-blocks": ["error", {
"functions": "always",
"keywords": "always"
}],
"space-infix-ops": "error",
"space-in-parens": ["error", "never"],
"space-unary-ops": "error",
"use-isnan": "warn",
"wrap-iife": ["error", "any"],
"wrap-regex": "error",
"valid-typeof": "warn",
"vars-on-top": "error",
"yoda": ["error", "never", {
"exceptRange": true
}]
}
};