1 | module.exports = {
|
2 | rules: {
|
3 | // enforce consistent spacing inside array brackets
|
4 | // http://eslint.org/docs/rules/array-bracket-spacing
|
5 | // This is handled by Prettier in Defaults 2.0
|
6 | 'array-bracket-spacing': 'off',
|
7 |
|
8 | // enforce consistent spacing inside single-line blocks
|
9 | // http://eslint.org/docs/rules/block-spacing
|
10 | // This is handled by Prettier in Defaults 2.0
|
11 | 'block-spacing': 'off',
|
12 |
|
13 | // enforce consistent brace style for blocks
|
14 | // http://eslint.org/docs/rules/brace-style
|
15 | // This is handled by Prettier in Defaults 2.0
|
16 | 'brace-style': 'off',
|
17 |
|
18 | // enforce camelcase naming convention
|
19 | // http://eslint.org/docs/rules/camelcase
|
20 | camelcase: ['error', { properties: 'never' }],
|
21 |
|
22 | // enforce or disallow capitalization of the first letter of a comment
|
23 | // http://eslint.org/docs/rules/capitalized-comments
|
24 | 'capitalized-comments': ['off', 'never', {
|
25 | line: {
|
26 | ignorePattern: '.*',
|
27 | ignoreInlineComments: true,
|
28 | ignoreConsecutiveComments: true,
|
29 | },
|
30 | block: {
|
31 | ignorePattern: '.*',
|
32 | ignoreInlineComments: true,
|
33 | ignoreConsecutiveComments: true,
|
34 | },
|
35 | }],
|
36 |
|
37 | // require trailing commas in multiline object literals
|
38 | // http://eslint.org/docs/rules/comma-dangle
|
39 | // This is handled by Prettier in Defaults 2.0
|
40 | 'comma-dangle': 'off',
|
41 |
|
42 | // enforce consistent spacing before and after commas
|
43 | // http://eslint.org/docs/rules/comma-spacing
|
44 | // This is handled by Prettier in Defaults 2.0
|
45 | 'comma-spacing': 'off',
|
46 |
|
47 | // enforce consistent comma style
|
48 | // http://eslint.org/docs/rules/comma-style
|
49 | // This is handled by Prettier in Defaults 2.0
|
50 | 'comma-style': 'off',
|
51 |
|
52 | // enforce consistent spacing inside computed property brackets
|
53 | // http://eslint.org/docs/rules/computed-property-spacing
|
54 | // This is handled by Prettier in Defaults 2.0
|
55 | 'computed-property-spacing': 'off',
|
56 |
|
57 | // enforce consistent naming when capturing the current execution context
|
58 | // http://eslint.org/docs/rules/consistent-this
|
59 | 'consistent-this': 'off',
|
60 |
|
61 | // require or disallow newline at the end of files
|
62 | // http://eslint.org/docs/rules/eol-last
|
63 | // This is handled by Prettier in Defaults 2.0
|
64 | 'eol-last': 'off',
|
65 |
|
66 | // require or disallow spacing between function identifiers and their invocations
|
67 | // http://eslint.org/docs/rules/func-call-spacing
|
68 | // This is handled by Prettier in Defaults 2.0
|
69 | 'func-call-spacing': 'off',
|
70 |
|
71 | // require function names to match the name of the variable or property to which they are assigned
|
72 | // http://eslint.org/docs/rules/func-name-matching
|
73 | 'func-name-matching': ['off', 'always', {
|
74 | includeCommonJSModuleExports: false,
|
75 | }],
|
76 |
|
77 | // require or disallow named function expressions
|
78 | // http://eslint.org/docs/rules/func-names
|
79 | 'func-names': 'warn',
|
80 |
|
81 | // enforce the consistent use of either function declarations or expressions
|
82 | // http://eslint.org/docs/rules/func-style
|
83 | 'func-style': 'off',
|
84 |
|
85 | // disallow specified identifiers
|
86 | // http://eslint.org/docs/rules/id-blacklist
|
87 | 'id-blacklist': 'off',
|
88 |
|
89 | // enforce minimum and maximum identifier lengths
|
90 | // http://eslint.org/docs/rules/id-length
|
91 | 'id-length': 'off',
|
92 |
|
93 | // require identifiers to match a specified regular expression
|
94 | // http://eslint.org/docs/rules/id-match
|
95 | 'id-match': 'off',
|
96 |
|
97 | // enforce consistent indentation
|
98 | // http://eslint.org/docs/rules/indent
|
99 | // This is handled by Prettier in Defaults 2.0
|
100 | indent: 'off',
|
101 |
|
102 | // enforce the consistent use of either double or single quotes in JSX attributes
|
103 | // http://eslint.org/docs/rules/jsx-quotes
|
104 | 'jsx-quotes': 'off',
|
105 |
|
106 | // enforce consistent spacing between keys and values in object literal properties
|
107 | // http://eslint.org/docs/rules/key-spacing
|
108 | // This is handled by Prettier in Defaults 2.0
|
109 | 'key-spacing': 'off',
|
110 |
|
111 | // enforce consistent spacing before and after keywords
|
112 | // http://eslint.org/docs/rules/keyword-spacing
|
113 | // This is handled by Prettier in Defaults 2.0
|
114 | 'keyword-spacing': 'off',
|
115 |
|
116 | // enforce position of line comments
|
117 | // http://eslint.org/docs/rules/line-comment-position
|
118 | 'line-comment-position': ['error', {
|
119 | position: 'above',
|
120 | ignorePattern: '',
|
121 | applyDefaultPatterns: true,
|
122 | }],
|
123 |
|
124 | // enforce consistent linebreak style
|
125 | // http://eslint.org/docs/rules/linebreak-style
|
126 | 'linebreak-style': ['error', 'unix'],
|
127 |
|
128 | // require empty lines around comments
|
129 | // http://eslint.org/docs/rules/lines-around-comment
|
130 | 'lines-around-comment': 'off',
|
131 |
|
132 | // require or disallow newlines around directives
|
133 | // http://eslint.org/docs/rules/lines-around-directive
|
134 | 'lines-around-directive': ['error', {
|
135 | before: 'always',
|
136 | after: 'always',
|
137 | }],
|
138 |
|
139 | // enforce a maximum depth that blocks can be nested
|
140 | // http://eslint.org/docs/rules/max-depth
|
141 | 'max-depth': ['off', 4],
|
142 |
|
143 | // enforce a maximum line length
|
144 | // http://eslint.org/docs/rules/max-len
|
145 | // This is handled by Prettier in Defaults 2.0
|
146 | 'max-len': 'off',
|
147 |
|
148 | // enforce a maximum number of lines per file
|
149 | // http://eslint.org/docs/rules/max-lines
|
150 | 'max-lines': ['off', {
|
151 | max: 300,
|
152 | skipBlankLines: true,
|
153 | skipComments: true,
|
154 | }],
|
155 |
|
156 | // enforce a maximum depth that callbacks can be nested
|
157 | // http://eslint.org/docs/rules/max-nested-callbacks
|
158 | 'max-nested-callbacks': 'off',
|
159 |
|
160 | // enforce a maximum number of parameters in function definitions
|
161 | // http://eslint.org/docs/rules/max-params
|
162 | 'max-params': ['off', 3],
|
163 |
|
164 | // enforce a maximum number of statements allowed per line
|
165 | // http://eslint.org/docs/rules/max-statements-per-line
|
166 | 'max-statements-per-line': ['off', { max: 1 }],
|
167 |
|
168 | // enforce a maximum number of statements allowed in function blocks
|
169 | // http://eslint.org/docs/rules/max-statements
|
170 | 'max-statements': ['off', 10],
|
171 |
|
172 | // enforce newlines between operands of ternary expressions
|
173 | // http://eslint.org/docs/rules/multiline-ternary
|
174 | // This is handled by Prettier in Defaults 2.0
|
175 | 'multiline-ternary': 'off',
|
176 |
|
177 | // require constructor names to begin with a capital letter
|
178 | // http://eslint.org/docs/rules/new-cap
|
179 | 'new-cap': ['error', {
|
180 | newIsCap: true,
|
181 | newIsCapExceptions: [],
|
182 | capIsNew: false,
|
183 | capIsNewExceptions: ['Immutable.Map', 'Immutable.Set', 'Immutable.List'],
|
184 | }],
|
185 |
|
186 | // require parentheses when invoking a constructor with no arguments
|
187 | // http://eslint.org/docs/rules/new-parens
|
188 | // This is handled by Prettier in Defaults 2.0
|
189 | 'new-parens': 'off',
|
190 |
|
191 | // require or disallow an empty line after variable declarations
|
192 | // http://eslint.org/docs/rules/newline-after-var
|
193 | 'newline-after-var': 'off',
|
194 |
|
195 | // require an empty line before return statements
|
196 | // http://eslint.org/docs/rules/newline-before-return
|
197 | 'newline-before-return': 'off',
|
198 |
|
199 | // require a newline after each call in a method chain
|
200 | // http://eslint.org/docs/rules/newline-per-chained-call
|
201 | // This is handled by Prettier in Defaults 2.0
|
202 | 'newline-per-chained-call': 'off',
|
203 |
|
204 | // disallow Array constructors
|
205 | // http://eslint.org/docs/rules/no-array-constructor
|
206 | 'no-array-constructor': 'error',
|
207 |
|
208 | // disallow bitwise operators
|
209 | // http://eslint.org/docs/rules/no-bitwise
|
210 | 'no-bitwise': 'error',
|
211 |
|
212 | // disallow continue statements
|
213 | // http://eslint.org/docs/rules/no-continue
|
214 | 'no-continue': 'error',
|
215 |
|
216 | // disallow inline comments after code
|
217 | // http://eslint.org/docs/rules/no-inline-comments
|
218 | 'no-inline-comments': 'off',
|
219 |
|
220 | // disallow if statements as the only statement in else blocks
|
221 | // http://eslint.org/docs/rules/no-lonely-if
|
222 | 'no-lonely-if': 'error',
|
223 |
|
224 | // disallow mixed binary operators
|
225 | // http://eslint.org/docs/rules/no-mixed-operators
|
226 | // This is handled by Prettier in Defaults 2.0
|
227 | 'no-mixed-operators': 'off',
|
228 |
|
229 | // disallow mixed spaces and tabs for indentation
|
230 | // http://eslint.org/docs/rules/no-mixed-spaces-and-tabs
|
231 | // This is handled by Prettier in Defaults 2.0
|
232 | 'no-mixed-spaces-and-tabs': 'off',
|
233 |
|
234 | // disallow use of chained assignment expressions
|
235 | // http://eslint.org/docs/rules/no-multi-assign
|
236 | 'no-multi-assign': ['error'],
|
237 |
|
238 | // disallow multiple empty lines
|
239 | // http://eslint.org/docs/rules/no-multiple-empty-lines
|
240 | // This is handled by Prettier in Defaults 2.0
|
241 | 'no-multiple-empty-lines': 'off',
|
242 |
|
243 | // disallow negated conditions
|
244 | // http://eslint.org/docs/rules/no-negated-condition
|
245 | 'no-negated-condition': 'off',
|
246 |
|
247 | // disallow nested ternary expressions
|
248 | // http://eslint.org/docs/rules/no-nested-ternary
|
249 | 'no-nested-ternary': 'off',
|
250 |
|
251 | // disallow Object constructors
|
252 | // http://eslint.org/docs/rules/no-new-object
|
253 | 'no-new-object': 'error',
|
254 |
|
255 | // disallow the unary operators ++ and --
|
256 | // http://eslint.org/docs/rules/no-plusplus
|
257 | 'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],
|
258 |
|
259 | // disallow specified syntax
|
260 | // http://eslint.org/docs/rules/no-restricted-syntax
|
261 | 'no-restricted-syntax': [
|
262 | 'error',
|
263 | 'LabeledStatement',
|
264 | 'WithStatement',
|
265 | ],
|
266 |
|
267 | // disallow tab characters entirely
|
268 | // http://eslint.org/docs/rules/no-tabs
|
269 | // This is handled by Prettier in Defaults 2.0
|
270 | 'no-tabs': 'off',
|
271 |
|
272 | // disallow ternary operators
|
273 | // http://eslint.org/docs/rules/no-ternary
|
274 | 'no-ternary': 'off',
|
275 |
|
276 | // disallow trailing whitespace at the end of lines
|
277 | // http://eslint.org/docs/rules/no-trailing-spaces
|
278 | // This is handled by Prettier in Defaults 2.0
|
279 | 'no-trailing-spaces': 'off',
|
280 |
|
281 | // disallow dangling underscores in identifiers
|
282 | // http://eslint.org/docs/rules/no-underscore-dangle
|
283 | 'no-underscore-dangle': ['error', { allow: ['__dirname'], allowAfterThis: true }],
|
284 |
|
285 | // disallow ternary operators when simpler alternatives exist
|
286 | // http://eslint.org/docs/rules/no-unneeded-ternary
|
287 | 'no-unneeded-ternary': ['error', { defaultAssignment: false }],
|
288 |
|
289 | // disallow whitespace before properties
|
290 | // http://eslint.org/docs/rules/no-whitespace-before-property
|
291 | // This is handled by Prettier in Defaults 2.0
|
292 | 'no-whitespace-before-property': 'off',
|
293 |
|
294 | // enforce consistent line breaks inside braces
|
295 | // http://eslint.org/docs/rules/object-curly-newline
|
296 | // This is handled by Prettier in Defaults 2.0
|
297 | 'object-curly-newline': 'off',
|
298 |
|
299 | // require padding inside curly braces
|
300 | // http://eslint.org/docs/rules/object-curly-spacing
|
301 | // This is handled by Prettier in Defaults 2.0
|
302 | 'object-curly-spacing': 'off',
|
303 |
|
304 | // enforce placing object properties on separate lines
|
305 | // http://eslint.org/docs/rules/object-property-newline
|
306 | // This is handled by Prettier in Defaults 2.0
|
307 | 'object-property-newline': 'off',
|
308 |
|
309 | // require or disallow newlines around variable declarations
|
310 | // http://eslint.org/docs/rules/one-var-declaration-per-line
|
311 | // This is handled by Prettier in Defaults 2.0
|
312 | 'one-var-declaration-per-line': 'off',
|
313 |
|
314 | // enforce variables to be declared either together or separately in functions
|
315 | // http://eslint.org/docs/rules/one-var
|
316 | 'one-var': ['error', 'never'],
|
317 |
|
318 | // require or disallow assignment operator shorthand where possible
|
319 | // http://eslint.org/docs/rules/operator-assignment
|
320 | 'operator-assignment': ['error', 'always'],
|
321 |
|
322 | // enforce consistent linebreak style for operators
|
323 | // http://eslint.org/docs/rules/operator-linebreak
|
324 | // This is handled by Prettier in Defaults 2.0
|
325 | 'operator-linebreak': 'off',
|
326 |
|
327 | // require or disallow padding within blocks
|
328 | // http://eslint.org/docs/rules/padded-blocks
|
329 | // This is handled by Prettier in Defaults 2.0
|
330 | 'padded-blocks': 'off',
|
331 |
|
332 | // require quotes around object literal property names
|
333 | // http://eslint.org/docs/rules/quote-props.html
|
334 | // This is handled by Prettier in Defaults 2.0
|
335 | 'quote-props': 'off',
|
336 |
|
337 | // enforce the consistent use of either backticks, double, or single quotes
|
338 | // http://eslint.org/docs/rules/quotes
|
339 | // This is handled by Prettier in Defaults 2.0
|
340 | quotes: 'off',
|
341 |
|
342 | // require JSDoc comments
|
343 | // http://eslint.org/docs/rules/require-jsdoc
|
344 | 'require-jsdoc': 'off',
|
345 |
|
346 | // enforce consistent spacing before and after semicolons
|
347 | // http://eslint.org/docs/rules/semi-spacing
|
348 | // This is handled by Prettier in Defaults 2.0
|
349 | 'semi-spacing': 'off',
|
350 |
|
351 | // require or disallow semicolons instead of ASI
|
352 | // http://eslint.org/docs/rules/semi
|
353 | // This is handled by Prettier in Defaults 2.0
|
354 | semi: 'off',
|
355 |
|
356 | // require object keys to be sorted
|
357 | // http://eslint.org/docs/rules/sort-keys
|
358 | 'sort-keys': ['off', 'asc', { caseSensitive: false, natural: true }],
|
359 |
|
360 | // require variables within the same declaration block to be sorted
|
361 | // http://eslint.org/docs/rules/sort-vars
|
362 | 'sort-vars': 'off',
|
363 |
|
364 | // enforce consistent spacing before blocks
|
365 | // http://eslint.org/docs/rules/space-before-blocks
|
366 | // This is handled by Prettier in Defaults 2.0
|
367 | 'space-before-blocks': 'off',
|
368 |
|
369 | // enforce consistent spacing before function definition opening parenthesis
|
370 | // http://eslint.org/docs/rules/space-before-function-paren
|
371 | // This is handled by Prettier in Defaults 2.0
|
372 | 'space-before-function-paren': 'off',
|
373 |
|
374 | // enforce consistent spacing inside parentheses
|
375 | // http://eslint.org/docs/rules/space-in-parens
|
376 | // This is handled by Prettier in Defaults 2.0
|
377 | 'space-in-parens': 'off',
|
378 |
|
379 | // require spacing around infix operators
|
380 | // http://eslint.org/docs/rules/space-infix-ops
|
381 | // This is handled by Prettier in Defaults 2.0
|
382 | 'space-infix-ops': 'off',
|
383 |
|
384 | // enforce consistent spacing before or after unary operators
|
385 | // http://eslint.org/docs/rules/space-unary-ops
|
386 | // This is handled by Prettier in Defaults 2.0
|
387 | 'space-unary-ops': 'off',
|
388 |
|
389 | // enforce consistent spacing after the // or /* in a comment
|
390 | // http://eslint.org/docs/rules/spaced-comment
|
391 | 'spaced-comment': ['error', 'always', {
|
392 | line: {
|
393 | exceptions: ['-', '+'],
|
394 | markers: ['=', '!'],
|
395 | },
|
396 | block: {
|
397 | exceptions: ['-', '+'],
|
398 | markers: ['=', '!'],
|
399 | balanced: false,
|
400 | },
|
401 | }],
|
402 |
|
403 | // require or disallow Unicode byte order mark (BOM)
|
404 | // http://eslint.org/docs/rules/unicode-bom
|
405 | // This is handled by Prettier in Defaults 2.0
|
406 | 'unicode-bom': 'off',
|
407 |
|
408 | // require parenthesis around regex literals
|
409 | // http://eslint.org/docs/rules/wrap-regex
|
410 | // This is handled by Prettier in Defaults 2.0
|
411 | 'wrap-regex': 'off',
|
412 | },
|
413 | };
|