]>
Commit | Line | Data |
---|---|---|
91e44d91 S |
1 | { |
2 | "root": true, | |
3 | "parser": "babel-eslint", | |
4 | "env": { | |
5 | "browser": true, | |
6 | "es6": true, | |
7 | "jquery": true | |
8 | }, | |
9 | "extends": "eslint:recommended", | |
10 | "parserOptions": { | |
11 | "ecmaVersion": 8, | |
12 | "sourceType": "module" | |
13 | }, | |
14 | "rules": { | |
15 | // Possible Errors | |
16 | "no-extra-parens": "error", | |
17 | "no-prototype-builtins": "off", | |
18 | "no-template-curly-in-string": "error", | |
19 | "no-unsafe-negation": "error", | |
20 | "valid-jsdoc": "error", | |
21 | ||
22 | // Best Practices | |
23 | "accessor-pairs": "error", | |
24 | "array-callback-return": "error", | |
25 | "block-scoped-var": "error", | |
26 | "class-methods-use-this": "off", | |
27 | "complexity": "error", | |
28 | "consistent-return": "error", | |
29 | "curly": "error", | |
30 | "default-case": "error", | |
31 | "dot-location": ["error", "property"], | |
32 | "dot-notation": "error", | |
33 | "eqeqeq": "error", | |
34 | "guard-for-in": "error", | |
35 | "no-alert": "error", | |
36 | "no-caller": "error", | |
37 | "no-div-regex": "error", | |
38 | "no-else-return": "error", | |
39 | "no-empty-function": "error", | |
40 | "no-eq-null": "error", | |
41 | "no-eval": "error", | |
42 | "no-extend-native": "error", | |
43 | "no-extra-bind": "error", | |
44 | "no-extra-label": "error", | |
45 | "no-floating-decimal": "error", | |
46 | "no-global-assign": "error", | |
47 | "no-implicit-coercion": "error", | |
48 | "no-implicit-globals": "error", | |
49 | "no-implied-eval": "error", | |
50 | "no-invalid-this": "off", | |
51 | "no-iterator": "error", | |
52 | "no-labels": "error", | |
53 | "no-lone-blocks": "error", | |
54 | "no-loop-func": "error", | |
55 | "no-magic-numbers": ["error", { | |
56 | "ignore": [-1, 0, 1], | |
57 | "ignoreArrayIndexes": true | |
58 | } | |
59 | ], | |
60 | "no-multi-spaces": ["error", { | |
61 | "exceptions": { | |
62 | "AssignmentExpression": true, | |
63 | "ArrowFunctionExpression": true, | |
64 | "CallExpression": true, | |
65 | "VariableDeclarator": true | |
66 | } | |
67 | } | |
68 | ], | |
69 | "no-multi-str": "error", | |
70 | "no-new-func": "off", | |
71 | "no-new-wrappers": "error", | |
72 | "no-new": "error", | |
73 | "no-octal-escape": "error", | |
74 | "no-param-reassign": "off", | |
75 | "no-proto": "error", | |
76 | "no-restricted-properties": "error", | |
77 | "no-return-assign": "off", | |
78 | "no-script-url": "error", | |
79 | "no-self-compare": "error", | |
80 | "no-sequences": "error", | |
81 | "no-throw-literal": "error", | |
82 | "no-unmodified-loop-condition": "error", | |
83 | "no-unused-expressions": "error", | |
84 | "no-useless-call": "error", | |
85 | "no-useless-concat": "error", | |
86 | "no-useless-escape": "error", | |
87 | "no-void": "error", | |
88 | "no-warning-comments": "off", | |
89 | "no-with": "error", | |
90 | "radix": "error", | |
91 | "vars-on-top": "error", | |
92 | "wrap-iife": "error", | |
93 | "yoda": "error", | |
94 | ||
95 | // Strict Mode | |
96 | "strict": "error", | |
97 | ||
98 | // Variables | |
99 | "init-declarations": "off", | |
100 | "no-catch-shadow": "error", | |
101 | "no-label-var": "error", | |
102 | "no-restricted-globals": "error", | |
103 | "no-shadow-restricted-names": "error", | |
104 | "no-shadow": "off", | |
105 | "no-undef-init": "error", | |
106 | "no-undefined": "off", | |
107 | "no-use-before-define": "off", | |
108 | ||
109 | // Node.js and CommonJS | |
110 | "callback-return": "off", | |
111 | "global-require": "error", | |
112 | "handle-callback-err": "error", | |
113 | "no-mixed-requires": "error", | |
114 | "no-new-require": "error", | |
115 | "no-path-concat": "error", | |
116 | "no-process-env": "error", | |
117 | "no-process-exit": "error", | |
118 | "no-restricted-modules": "error", | |
119 | "no-sync": "error", | |
120 | ||
121 | // Stylistic Issues | |
122 | "array-bracket-spacing": "error", | |
123 | "block-spacing": "error", | |
124 | "brace-style": "error", | |
125 | "camelcase": "error", | |
126 | "comma-dangle": "error", | |
127 | "comma-spacing": "error", | |
128 | "comma-style": "error", | |
129 | "computed-property-spacing": "error", | |
130 | "consistent-this": "error", | |
131 | "eol-last": "error", | |
132 | "func-call-spacing": "error", | |
133 | "func-names": "off", | |
134 | "func-style": ["error", "declaration"], | |
135 | "id-blacklist": "error", | |
136 | "id-length": "off", | |
137 | "id-match": "error", | |
138 | "indent": ["error", 2, { "SwitchCase": 1 }], | |
139 | "jsx-quotes": "error", | |
140 | "key-spacing": "off", | |
141 | "keyword-spacing": "error", | |
142 | "line-comment-position": "off", | |
143 | "linebreak-style": ["error", "unix"], | |
144 | "lines-around-comment": "off", | |
145 | "lines-around-directive": "error", | |
146 | "max-depth": ["error", 10], | |
147 | "max-len": "off", | |
148 | "max-lines": "off", | |
149 | "max-nested-callbacks": "error", | |
150 | "max-params": "off", | |
151 | "max-statements-per-line": "error", | |
152 | "max-statements": "off", | |
153 | "multiline-ternary": "off", | |
154 | "new-cap": ["error", { "capIsNewExceptionPattern": "$.*" }], | |
155 | "new-parens": "error", | |
156 | "newline-after-var": "off", | |
157 | "newline-before-return": "off", | |
158 | "newline-per-chained-call": ["error", { "ignoreChainWithDepth": 5 }], | |
159 | "no-array-constructor": "error", | |
160 | "no-bitwise": "error", | |
161 | "no-continue": "off", | |
162 | "no-inline-comments": "off", | |
163 | "no-lonely-if": "error", | |
164 | "no-mixed-operators": "off", | |
165 | "no-multiple-empty-lines": "error", | |
166 | "no-negated-condition": "off", | |
167 | "no-nested-ternary": "error", | |
168 | "no-new-object": "error", | |
169 | "no-plusplus": "off", | |
170 | "no-restricted-syntax": "error", | |
171 | "no-tabs": "error", | |
172 | "no-ternary": "off", | |
173 | "no-trailing-spaces": "error", | |
174 | "no-underscore-dangle": "off", | |
175 | "no-unneeded-ternary": "error", | |
176 | "no-whitespace-before-property": "error", | |
177 | "object-curly-newline": ["error", { "minProperties": 1 }], | |
178 | "object-curly-spacing": ["error", "always"], | |
179 | "object-property-newline": "error", | |
180 | "one-var-declaration-per-line": "error", | |
181 | "one-var": ["error", "never"], | |
182 | "operator-assignment": "error", | |
183 | "operator-linebreak": "off", | |
184 | "padded-blocks": "off", | |
185 | "quote-props": ["error", "as-needed"], | |
186 | "quotes": ["error", "single"], | |
187 | "require-jsdoc": "off", | |
188 | "semi-spacing": "error", | |
189 | "semi": ["error", "never"], | |
190 | "sort-keys": "off", | |
191 | "sort-vars": "error", | |
192 | "space-before-blocks": "error", | |
193 | "space-before-function-paren": ["error", { | |
194 | "anonymous": "always", | |
195 | "named": "never" | |
196 | }], | |
197 | "space-in-parens": "error", | |
198 | "space-infix-ops": "error", | |
199 | "space-unary-ops": "error", | |
200 | "spaced-comment": "error", | |
201 | "unicode-bom": "error", | |
202 | "wrap-regex": "off", | |
203 | ||
204 | // ECMAScript 6 | |
205 | "arrow-body-style": "off", | |
206 | "arrow-parens": "error", | |
207 | "arrow-spacing": "error", | |
208 | "generator-star-spacing": "error", | |
209 | "no-confusing-arrow": "error", | |
210 | "no-duplicate-imports": "error", | |
211 | "no-restricted-imports": "error", | |
212 | "no-useless-computed-key": "error", | |
213 | "no-useless-constructor": "error", | |
214 | "no-useless-rename": "error", | |
215 | "no-var": "error", | |
216 | "object-shorthand": "error", | |
217 | "prefer-arrow-callback": "error", | |
218 | "prefer-const": "error", | |
219 | "prefer-numeric-literals": "error", | |
220 | "prefer-reflect": "off", | |
221 | "prefer-rest-params": "error", | |
222 | "prefer-spread": "error", | |
223 | "prefer-template": "error", | |
224 | "rest-spread-spacing": "error", | |
225 | "sort-imports": "error", | |
226 | "symbol-description": "error", | |
227 | "template-curly-spacing": "error", | |
228 | "yield-star-spacing": "error" | |
229 | } | |
230 | } |