@@ -2,15 +2,18 @@ module.exports = {
2
2
rules : {
3
3
// enforce consistent spacing inside array brackets
4
4
// http://eslint.org/docs/rules/array-bracket-spacing
5
- 'array-bracket-spacing' : [ 'error' , 'never' ] ,
5
+ // This is handled by Prettier in Defaults 2.0
6
+ 'array-bracket-spacing' : 'off' ,
6
7
7
8
// enforce consistent spacing inside single-line blocks
8
9
// http://eslint.org/docs/rules/block-spacing
9
- 'block-spacing' : [ 'error' , 'always' ] ,
10
+ // This is handled by Prettier in Defaults 2.0
11
+ 'block-spacing' : 'off' ,
10
12
11
13
// enforce consistent brace style for blocks
12
14
// http://eslint.org/docs/rules/brace-style
13
- 'brace-style' : [ 'error' , '1tbs' , { allowSingleLine : true } ] ,
15
+ // This is handled by Prettier in Defaults 2.0
16
+ 'brace-style' : 'off' ,
14
17
15
18
// enforce camelcase naming convention
16
19
// http://eslint.org/docs/rules/camelcase
@@ -33,37 +36,37 @@ module.exports = {
33
36
34
37
// require trailing commas in multiline object literals
35
38
// http://eslint.org/docs/rules/comma-dangle
36
- 'comma-dangle' : [ 'error' , {
37
- arrays : 'always-multiline' ,
38
- objects : 'always-multiline' ,
39
- imports : 'always-multiline' ,
40
- exports : 'always-multiline' ,
41
- functions : 'always-multiline' ,
42
- } ] ,
39
+ // This is handled by Prettier in Defaults 2.0
40
+ 'comma-dangle' : 'off' ,
43
41
44
42
// enforce consistent spacing before and after commas
45
43
// http://eslint.org/docs/rules/comma-spacing
46
- 'comma-spacing' : [ 'error' , { before : false , after : true } ] ,
44
+ // This is handled by Prettier in Defaults 2.0
45
+ 'comma-spacing' : 'off' ,
47
46
48
47
// enforce consistent comma style
49
48
// http://eslint.org/docs/rules/comma-style
50
- 'comma-style' : [ 'error' , 'last' ] ,
49
+ // This is handled by Prettier in Defaults 2.0
50
+ 'comma-style' : 'off' ,
51
51
52
52
// enforce consistent spacing inside computed property brackets
53
53
// http://eslint.org/docs/rules/computed-property-spacing
54
- 'computed-property-spacing' : [ 'error' , 'never' ] ,
54
+ // This is handled by Prettier in Defaults 2.0
55
+ 'computed-property-spacing' : 'off' ,
55
56
56
57
// enforce consistent naming when capturing the current execution context
57
58
// http://eslint.org/docs/rules/consistent-this
58
59
'consistent-this' : 'off' ,
59
60
60
61
// require or disallow newline at the end of files
61
62
// http://eslint.org/docs/rules/eol-last
62
- 'eol-last' : [ 'error' , 'always' ] ,
63
+ // This is handled by Prettier in Defaults 2.0
64
+ 'eol-last' : 'off' ,
63
65
64
66
// require or disallow spacing between function identifiers and their invocations
65
67
// http://eslint.org/docs/rules/func-call-spacing
66
- 'func-call-spacing' : [ 'error' , 'never' ] ,
68
+ // This is handled by Prettier in Defaults 2.0
69
+ 'func-call-spacing' : 'off' ,
67
70
68
71
// require function names to match the name of the variable or property to which they are assigned
69
72
// http://eslint.org/docs/rules/func-name-matching
@@ -93,39 +96,22 @@ module.exports = {
93
96
94
97
// enforce consistent indentation
95
98
// http://eslint.org/docs/rules/indent
96
- indent : [ 'error' , 2 , {
97
- SwitchCase : 1 ,
98
- VariableDeclarator : 1 ,
99
- outerIIFEBody : 1 ,
100
- FunctionDeclaration : {
101
- parameters : 1 ,
102
- body : 1 ,
103
- } ,
104
- FunctionExpression : {
105
- parameters : 1 ,
106
- body : 1 ,
107
- } ,
108
- } ] ,
99
+ // This is handled by Prettier in Defaults 2.0
100
+ indent : 'off' ,
109
101
110
102
// enforce the consistent use of either double or single quotes in JSX attributes
111
103
// http://eslint.org/docs/rules/jsx-quotes
112
- 'jsx-quotes' : [ 'off' , 'prefer-double' ] ,
104
+ 'jsx-quotes' : 'off' ,
113
105
114
106
// enforce consistent spacing between keys and values in object literal properties
115
107
// http://eslint.org/docs/rules/key-spacing
116
- 'key-spacing' : [ 'error' , { beforeColon : false , afterColon : true } ] ,
108
+ // This is handled by Prettier in Defaults 2.0
109
+ 'key-spacing' : 'off' ,
117
110
118
111
// enforce consistent spacing before and after keywords
119
112
// http://eslint.org/docs/rules/keyword-spacing
120
- 'keyword-spacing' : [ 'error' , {
121
- before : true ,
122
- after : true ,
123
- overrides : {
124
- return : { after : true } ,
125
- throw : { after : true } ,
126
- case : { after : true } ,
127
- } ,
128
- } ] ,
113
+ // This is handled by Prettier in Defaults 2.0
114
+ 'keyword-spacing' : 'off' ,
129
115
130
116
// enforce position of line comments
131
117
// http://eslint.org/docs/rules/line-comment-position
@@ -156,13 +142,8 @@ module.exports = {
156
142
157
143
// enforce a maximum line length
158
144
// http://eslint.org/docs/rules/max-len
159
- 'max-len' : [ 'error' , 140 , 2 , {
160
- ignoreUrls : true ,
161
- ignoreComments : false ,
162
- ignoreRegExpLiterals : true ,
163
- ignoreStrings : true ,
164
- ignoreTemplateLiterals : true ,
165
- } ] ,
145
+ // This is handled by Prettier in Defaults 2.0
146
+ 'max-len' : 'off' ,
166
147
167
148
// enforce a maximum number of lines per file
168
149
// http://eslint.org/docs/rules/max-lines
@@ -190,7 +171,8 @@ module.exports = {
190
171
191
172
// enforce newlines between operands of ternary expressions
192
173
// http://eslint.org/docs/rules/multiline-ternary
193
- 'multiline-ternary' : [ 'off' , 'always' ] ,
174
+ // This is handled by Prettier in Defaults 2.0
175
+ 'multiline-ternary' : 'off' ,
194
176
195
177
// require constructor names to begin with a capital letter
196
178
// http://eslint.org/docs/rules/new-cap
@@ -203,7 +185,8 @@ module.exports = {
203
185
204
186
// require parentheses when invoking a constructor with no arguments
205
187
// http://eslint.org/docs/rules/new-parens
206
- 'new-parens' : 'error' ,
188
+ // This is handled by Prettier in Defaults 2.0
189
+ 'new-parens' : 'pff' ,
207
190
208
191
// require or disallow an empty line after variable declarations
209
192
// http://eslint.org/docs/rules/newline-after-var
@@ -215,7 +198,8 @@ module.exports = {
215
198
216
199
// require a newline after each call in a method chain
217
200
// http://eslint.org/docs/rules/newline-per-chained-call
218
- 'newline-per-chained-call' : [ 'error' , { ignoreChainWithDepth : 4 } ] ,
201
+ // This is handled by Prettier in Defaults 2.0
202
+ 'newline-per-chained-call' : 'off' ,
219
203
220
204
// disallow Array constructors
221
205
// http://eslint.org/docs/rules/no-array-constructor
@@ -239,28 +223,22 @@ module.exports = {
239
223
240
224
// disallow mixed binary operators
241
225
// http://eslint.org/docs/rules/no-mixed-operators
242
- 'no-mixed-operators' : [ 'error' , {
243
- groups : [
244
- [ '+' , '-' , '*' , '/' , '%' , '**' ] ,
245
- [ '&' , '|' , '^' , '~' , '<<' , '>>' , '>>>' ] ,
246
- [ '==' , '!=' , '===' , '!==' , '>' , '>=' , '<' , '<=' ] ,
247
- [ '&&' , '||' ] ,
248
- [ 'in' , 'instanceof' ] ,
249
- ] ,
250
- allowSamePrecedence : false ,
251
- } ] ,
226
+ // This is handled by Prettier in Defaults 2.0
227
+ 'no-mixed-operators' : 'off' ,
252
228
253
229
// disallow mixed spaces and tabs for indentation
254
230
// http://eslint.org/docs/rules/no-mixed-spaces-and-tabs
255
- 'no-mixed-spaces-and-tabs' : 'error' ,
231
+ // This is handled by Prettier in Defaults 2.0
232
+ 'no-mixed-spaces-and-tabs' : 'off' ,
256
233
257
234
// disallow use of chained assignment expressions
258
235
// http://eslint.org/docs/rules/no-multi-assign
259
236
'no-multi-assign' : [ 'error' ] ,
260
237
261
238
// disallow multiple empty lines
262
239
// http://eslint.org/docs/rules/no-multiple-empty-lines
263
- 'no-multiple-empty-lines' : [ 'error' , { max : 2 , maxEOF : 1 } ] ,
240
+ // This is handled by Prettier in Defaults 2.0
241
+ 'no-multiple-empty-lines' : 'off' ,
264
242
265
243
// disallow negated conditions
266
244
// http://eslint.org/docs/rules/no-negated-condition
@@ -288,15 +266,17 @@ module.exports = {
288
266
289
267
// disallow tab characters entirely
290
268
// http://eslint.org/docs/rules/no-tabs
291
- 'no-tabs' : 'error' ,
269
+ // This is handled by Prettier in Defaults 2.0
270
+ 'no-tabs' : 'off' ,
292
271
293
272
// disallow ternary operators
294
273
// http://eslint.org/docs/rules/no-ternary
295
274
'no-ternary' : 'off' ,
296
275
297
276
// disallow trailing whitespace at the end of lines
298
277
// http://eslint.org/docs/rules/no-trailing-spaces
299
- 'no-trailing-spaces' : 'error' ,
278
+ // This is handled by Prettier in Defaults 2.0
279
+ 'no-trailing-spaces' : 'off' ,
300
280
301
281
// disallow dangling underscores in identifiers
302
282
// http://eslint.org/docs/rules/no-underscore-dangle
@@ -308,28 +288,28 @@ module.exports = {
308
288
309
289
// disallow whitespace before properties
310
290
// http://eslint.org/docs/rules/no-whitespace-before-property
311
- 'no-whitespace-before-property' : 'error' ,
291
+ // This is handled by Prettier in Defaults 2.0
292
+ 'no-whitespace-before-property' : 'off' ,
312
293
313
294
// enforce consistent line breaks inside braces
314
295
// http://eslint.org/docs/rules/object-curly-newline
315
- 'object-curly-newline' : [ 'off' , {
316
- ObjectExpression : { minProperties : 0 , multiline : true } ,
317
- ObjectPattern : { minProperties : 0 , multiline : true } ,
318
- } ] ,
296
+ // This is handled by Prettier in Defaults 2.0
297
+ 'object-curly-newline' : 'off' ,
319
298
320
299
// require padding inside curly braces
321
300
// http://eslint.org/docs/rules/object-curly-spacing
322
- 'object-curly-spacing' : [ 'error' , 'always' ] ,
301
+ // This is handled by Prettier in Defaults 2.0
302
+ 'object-curly-spacing' : 'off' ,
323
303
324
304
// enforce placing object properties on separate lines
325
305
// http://eslint.org/docs/rules/object-property-newline
326
- 'object-property-newline' : [ 'error' , {
327
- allowMultiplePropertiesPerLine : true ,
328
- } ] ,
306
+ // This is handled by Prettier in Defaults 2.0
307
+ 'object-property-newline' : 'off' ,
329
308
330
309
// require or disallow newlines around variable declarations
331
310
// http://eslint.org/docs/rules/one-var-declaration-per-line
332
- 'one-var-declaration-per-line' : [ 'error' , 'always' ] ,
311
+ // This is handled by Prettier in Defaults 2.0
312
+ 'one-var-declaration-per-line' : 'off' ,
333
313
334
314
// enforce variables to be declared either together or separately in functions
335
315
// http://eslint.org/docs/rules/one-var
@@ -341,31 +321,37 @@ module.exports = {
341
321
342
322
// enforce consistent linebreak style for operators
343
323
// http://eslint.org/docs/rules/operator-linebreak
324
+ // This is handled by Prettier in Defaults 2.0
344
325
'operator-linebreak' : 'off' ,
345
326
346
327
// require or disallow padding within blocks
347
328
// http://eslint.org/docs/rules/padded-blocks
348
- 'padded-blocks' : [ 'error' , 'never' ] ,
329
+ // This is handled by Prettier in Defaults 2.0
330
+ 'padded-blocks' : 'off' ,
349
331
350
332
// require quotes around object literal property names
351
333
// http://eslint.org/docs/rules/quote-props.html
352
- 'quote-props' : [ 'error' , 'as-needed' , { keywords : false , unnecessary : true , numbers : false } ] ,
334
+ // This is handled by Prettier in Defaults 2.0
335
+ 'quote-props' : 'off' ,
353
336
354
337
// enforce the consistent use of either backticks, double, or single quotes
355
338
// http://eslint.org/docs/rules/quotes
356
- quotes : [ 'error' , 'single' , { avoidEscape : true } ] ,
339
+ // This is handled by Prettier in Defaults 2.0
340
+ quotes : 'off' ,
357
341
358
342
// require JSDoc comments
359
343
// http://eslint.org/docs/rules/require-jsdoc
360
344
'require-jsdoc' : 'off' ,
361
345
362
346
// enforce consistent spacing before and after semicolons
363
347
// http://eslint.org/docs/rules/semi-spacing
364
- 'semi-spacing' : [ 'error' , { before : false , after : true } ] ,
348
+ // This is handled by Prettier in Defaults 2.0
349
+ 'semi-spacing' : 'off' ,
365
350
366
351
// require or disallow semicolons instead of ASI
367
352
// http://eslint.org/docs/rules/semi
368
- semi : [ 'error' , 'always' ] ,
353
+ // This is handled by Prettier in Defaults 2.0
354
+ semi : 'off' ,
369
355
370
356
// require object keys to be sorted
371
357
// http://eslint.org/docs/rules/sort-keys
@@ -377,32 +363,28 @@ module.exports = {
377
363
378
364
// enforce consistent spacing before blocks
379
365
// http://eslint.org/docs/rules/space-before-blocks
380
- 'space-before-blocks' : 'error' ,
366
+ // This is handled by Prettier in Defaults 2.0
367
+ 'space-before-blocks' : 'off' ,
381
368
382
369
// enforce consistent spacing before function definition opening parenthesis
383
370
// http://eslint.org/docs/rules/space-before-function-paren
384
- 'space-before-function-paren' : [ 'error' , {
385
- anonymous : 'always' ,
386
- named : 'never' ,
387
- asyncArrow : 'always' ,
388
- } ] ,
371
+ // This is handled by Prettier in Defaults 2.0
372
+ 'space-before-function-paren' : 'off' ,
389
373
390
374
// enforce consistent spacing inside parentheses
391
375
// http://eslint.org/docs/rules/space-in-parens
392
- 'space-in-parens' : [ 'error' , 'never' ] ,
376
+ // This is handled by Prettier in Defaults 2.0
377
+ 'space-in-parens' : 'off' ,
393
378
394
379
// require spacing around infix operators
395
380
// http://eslint.org/docs/rules/space-infix-ops
396
- 'space-infix-ops' : 'error' ,
381
+ // This is handled by Prettier in Defaults 2.0
382
+ 'space-infix-ops' : 'off' ,
397
383
398
384
// enforce consistent spacing before or after unary operators
399
385
// http://eslint.org/docs/rules/space-unary-ops
400
- 'space-unary-ops' : [ 'error' , {
401
- words : true ,
402
- nonwords : false ,
403
- overrides : {
404
- } ,
405
- } ] ,
386
+ // This is handled by Prettier in Defaults 2.0
387
+ 'space-unary-ops' : 'off' ,
406
388
407
389
// enforce consistent spacing after the // or /* in a comment
408
390
// http://eslint.org/docs/rules/spaced-comment
@@ -420,10 +402,12 @@ module.exports = {
420
402
421
403
// require or disallow Unicode byte order mark (BOM)
422
404
// http://eslint.org/docs/rules/unicode-bom
423
- 'unicode-bom' : [ 'error' , 'never' ] ,
405
+ // This is handled by Prettier in Defaults 2.0
406
+ 'unicode-bom' : 'off' ,
424
407
425
408
// require parenthesis around regex literals
426
409
// http://eslint.org/docs/rules/wrap-regex
410
+ // This is handled by Prettier in Defaults 2.0
427
411
'wrap-regex' : 'off' ,
428
412
} ,
429
413
} ;
0 commit comments