eslint-config-airbnb-extended 1.0.10 → 2.0.0-beta-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/@types/legacy.d.ts +12 -0
  2. package/dist/helpers/getDevDepsList.js +1 -0
  3. package/dist/legacy/configs/base/config.js +24 -0
  4. package/dist/legacy/configs/base/index.js +18 -0
  5. package/dist/legacy/configs/base/legacy.js +46 -0
  6. package/dist/legacy/configs/base/recommended.js +21 -0
  7. package/dist/legacy/configs/base/typescript.js +8 -0
  8. package/dist/legacy/configs/index.js +15 -0
  9. package/dist/legacy/configs/react/base.js +8 -0
  10. package/dist/legacy/configs/react/config.js +14 -0
  11. package/dist/legacy/configs/react/hooks.js +8 -0
  12. package/dist/legacy/configs/react/index.js +24 -0
  13. package/dist/legacy/configs/react/legacy.js +8 -0
  14. package/dist/legacy/configs/react/recommended.js +13 -0
  15. package/dist/legacy/configs/react/typescript.js +35 -0
  16. package/dist/legacy/configs/typescript/config.js +12 -0
  17. package/dist/legacy/rules/best-practices.js +433 -0
  18. package/dist/legacy/rules/errors.js +167 -0
  19. package/dist/legacy/rules/es6.js +206 -0
  20. package/dist/legacy/rules/imports.js +280 -0
  21. package/dist/legacy/rules/index.js +18 -0
  22. package/dist/legacy/rules/node.js +35 -0
  23. package/dist/legacy/rules/react/react.js +663 -0
  24. package/dist/legacy/rules/react/reactHooks.js +30 -0
  25. package/dist/legacy/rules/react/reactJsxA11y.js +276 -0
  26. package/dist/legacy/rules/strict.js +12 -0
  27. package/dist/legacy/rules/style.js +655 -0
  28. package/dist/legacy/rules/typescript/typescript.js +251 -0
  29. package/dist/legacy/rules/typescript/typescriptOverrides.js +36 -0
  30. package/dist/legacy/rules/variables.js +68 -0
  31. package/dist/legacy.js +14 -0
  32. package/dist/rules/typescript/typescriptEslint.js +3 -0
  33. package/package.json +25 -10
@@ -0,0 +1,655 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const utils_1 = require("../../utils");
4
+ const legacyStyleRules = {
5
+ name: 'airbnb/config/style/legacy',
6
+ files: utils_1.allFiles,
7
+ rules: {
8
+ // enforce line breaks after opening and before closing array brackets
9
+ // https://eslint.org/docs/rules/array-bracket-newline
10
+ 'array-bracket-newline': ['off', 'consistent'], // object option alternative: { multiline: true, minItems: 3 }
11
+ // enforce line breaks between array elements
12
+ // https://eslint.org/docs/rules/array-element-newline
13
+ 'array-element-newline': [
14
+ 'off',
15
+ {
16
+ multiline: true,
17
+ minItems: 3,
18
+ },
19
+ ],
20
+ // enforce spacing inside array brackets
21
+ 'array-bracket-spacing': ['error', 'never'],
22
+ // enforce spacing inside single-line blocks
23
+ // https://eslint.org/docs/rules/block-spacing
24
+ 'block-spacing': ['error', 'always'],
25
+ // enforce one true brace style
26
+ 'brace-style': [
27
+ 'error',
28
+ '1tbs',
29
+ {
30
+ allowSingleLine: true,
31
+ },
32
+ ],
33
+ // require camel case names
34
+ camelcase: [
35
+ 'error',
36
+ {
37
+ properties: 'never',
38
+ ignoreDestructuring: false,
39
+ },
40
+ ],
41
+ // enforce or disallow capitalization of the first letter of a comment
42
+ // https://eslint.org/docs/rules/capitalized-comments
43
+ 'capitalized-comments': [
44
+ 'off',
45
+ 'never',
46
+ {
47
+ line: {
48
+ ignorePattern: '.*',
49
+ ignoreInlineComments: true,
50
+ ignoreConsecutiveComments: true,
51
+ },
52
+ block: {
53
+ ignorePattern: '.*',
54
+ ignoreInlineComments: true,
55
+ ignoreConsecutiveComments: true,
56
+ },
57
+ },
58
+ ],
59
+ // require trailing commas in multiline object literals
60
+ 'comma-dangle': [
61
+ 'error',
62
+ {
63
+ arrays: 'always-multiline',
64
+ objects: 'always-multiline',
65
+ imports: 'always-multiline',
66
+ exports: 'always-multiline',
67
+ functions: 'always-multiline',
68
+ },
69
+ ],
70
+ // enforce spacing before and after comma
71
+ 'comma-spacing': [
72
+ 'error',
73
+ {
74
+ before: false,
75
+ after: true,
76
+ },
77
+ ],
78
+ // enforce one true comma style
79
+ 'comma-style': [
80
+ 'error',
81
+ 'last',
82
+ {
83
+ exceptions: {
84
+ ArrayExpression: false,
85
+ ArrayPattern: false,
86
+ ArrowFunctionExpression: false,
87
+ CallExpression: false,
88
+ FunctionDeclaration: false,
89
+ FunctionExpression: false,
90
+ ImportDeclaration: false,
91
+ ObjectExpression: false,
92
+ ObjectPattern: false,
93
+ VariableDeclaration: false,
94
+ NewExpression: false,
95
+ },
96
+ },
97
+ ],
98
+ // disallow padding inside computed properties
99
+ 'computed-property-spacing': ['error', 'never'],
100
+ // enforces consistent naming when capturing the current execution context
101
+ 'consistent-this': 'off',
102
+ // enforce newline at the end of file, with no multiple empty lines
103
+ 'eol-last': ['error', 'always'],
104
+ // https://eslint.org/docs/rules/function-call-argument-newline
105
+ 'function-call-argument-newline': ['error', 'consistent'],
106
+ // enforce spacing between functions and their invocations
107
+ // https://eslint.org/docs/rules/func-call-spacing
108
+ 'func-call-spacing': ['error', 'never'],
109
+ // requires function names to match the name of the variable or property to which they are
110
+ // assigned
111
+ // https://eslint.org/docs/rules/func-name-matching
112
+ 'func-name-matching': [
113
+ 'off',
114
+ 'always',
115
+ {
116
+ includeCommonJSModuleExports: false,
117
+ considerPropertyDescriptor: true,
118
+ },
119
+ ],
120
+ // require function expressions to have a name
121
+ // https://eslint.org/docs/rules/func-names
122
+ 'func-names': 'warn',
123
+ // enforces use of function declarations or expressions
124
+ // https://eslint.org/docs/rules/func-style
125
+ 'func-style': ['off', 'expression'],
126
+ // require line breaks inside function parentheses if there are line breaks between parameters
127
+ // https://eslint.org/docs/rules/function-paren-newline
128
+ 'function-paren-newline': ['error', 'multiline-arguments'],
129
+ // disallow specified identifiers
130
+ // https://eslint.org/docs/rules/id-denylist
131
+ 'id-denylist': 'off',
132
+ // this option enforces minimum and maximum identifier lengths
133
+ // (variable names, property names etc.)
134
+ 'id-length': 'off',
135
+ // require identifiers to match the provided regular expression
136
+ 'id-match': 'off',
137
+ // Enforce the location of arrow function bodies with implicit returns
138
+ // https://eslint.org/docs/rules/implicit-arrow-linebreak
139
+ 'implicit-arrow-linebreak': ['error', 'beside'],
140
+ // this option sets a specific tab width for your code
141
+ // https://eslint.org/docs/rules/indent
142
+ indent: [
143
+ 'error',
144
+ 2,
145
+ {
146
+ SwitchCase: 1,
147
+ VariableDeclarator: 1,
148
+ outerIIFEBody: 1,
149
+ // MemberExpression: null,
150
+ FunctionDeclaration: {
151
+ parameters: 1,
152
+ body: 1,
153
+ },
154
+ FunctionExpression: {
155
+ parameters: 1,
156
+ body: 1,
157
+ },
158
+ CallExpression: {
159
+ arguments: 1,
160
+ },
161
+ ArrayExpression: 1,
162
+ ObjectExpression: 1,
163
+ ImportDeclaration: 1,
164
+ flatTernaryExpressions: false,
165
+ // list derived from https://github.com/benjamn/ast-types/blob/HEAD/def/jsx.js
166
+ ignoredNodes: [
167
+ 'JSXElement',
168
+ 'JSXElement > *',
169
+ 'JSXAttribute',
170
+ 'JSXIdentifier',
171
+ 'JSXNamespacedName',
172
+ 'JSXMemberExpression',
173
+ 'JSXSpreadAttribute',
174
+ 'JSXExpressionContainer',
175
+ 'JSXOpeningElement',
176
+ 'JSXClosingElement',
177
+ 'JSXFragment',
178
+ 'JSXOpeningFragment',
179
+ 'JSXClosingFragment',
180
+ 'JSXText',
181
+ 'JSXEmptyExpression',
182
+ 'JSXSpreadChild',
183
+ ],
184
+ ignoreComments: false,
185
+ },
186
+ ],
187
+ // specify whether double or single quotes should be used in JSX attributes
188
+ // https://eslint.org/docs/rules/jsx-quotes
189
+ 'jsx-quotes': ['off', 'prefer-double'],
190
+ // enforces spacing between keys and values in object literal properties
191
+ 'key-spacing': [
192
+ 'error',
193
+ {
194
+ beforeColon: false,
195
+ afterColon: true,
196
+ },
197
+ ],
198
+ // require a space before & after certain keywords
199
+ 'keyword-spacing': [
200
+ 'error',
201
+ {
202
+ before: true,
203
+ after: true,
204
+ overrides: {
205
+ return: {
206
+ after: true,
207
+ },
208
+ throw: {
209
+ after: true,
210
+ },
211
+ case: {
212
+ after: true,
213
+ },
214
+ },
215
+ },
216
+ ],
217
+ // enforce position of line comments
218
+ // https://eslint.org/docs/rules/line-comment-position
219
+ 'line-comment-position': [
220
+ 'off',
221
+ {
222
+ position: 'above',
223
+ ignorePattern: '',
224
+ applyDefaultPatterns: true,
225
+ },
226
+ ],
227
+ // disallow mixed 'LF' and 'CRLF' as linebreaks
228
+ // https://eslint.org/docs/rules/linebreak-style
229
+ 'linebreak-style': ['error', 'unix'],
230
+ // require or disallow an empty line between class members
231
+ // https://eslint.org/docs/rules/lines-between-class-members
232
+ 'lines-between-class-members': [
233
+ 'error',
234
+ 'always',
235
+ {
236
+ exceptAfterSingleLine: false,
237
+ },
238
+ ],
239
+ // enforces empty lines around comments
240
+ 'lines-around-comment': 'off',
241
+ // require or disallow newlines around directives
242
+ // https://eslint.org/docs/rules/lines-around-directive
243
+ 'lines-around-directive': [
244
+ 'error',
245
+ {
246
+ before: 'always',
247
+ after: 'always',
248
+ },
249
+ ],
250
+ // Require or disallow logical assignment logical operator shorthand
251
+ // https://eslint.org/docs/latest/rules/logical-assignment-operators
252
+ // TODO, semver-major: enable
253
+ 'logical-assignment-operators': [
254
+ 'off',
255
+ 'always',
256
+ {
257
+ enforceForIfStatements: true,
258
+ },
259
+ ],
260
+ // specify the maximum depth that blocks can be nested
261
+ 'max-depth': ['off', 4],
262
+ // specify the maximum length of a line in your program
263
+ // https://eslint.org/docs/rules/max-len
264
+ 'max-len': [
265
+ 'error',
266
+ 100,
267
+ 2,
268
+ {
269
+ ignoreUrls: true,
270
+ ignoreComments: false,
271
+ ignoreRegExpLiterals: true,
272
+ ignoreStrings: true,
273
+ ignoreTemplateLiterals: true,
274
+ },
275
+ ],
276
+ // specify the max number of lines in a file
277
+ // https://eslint.org/docs/rules/max-lines
278
+ 'max-lines': [
279
+ 'off',
280
+ {
281
+ max: 300,
282
+ skipBlankLines: true,
283
+ skipComments: true,
284
+ },
285
+ ],
286
+ // enforce a maximum function length
287
+ // https://eslint.org/docs/rules/max-lines-per-function
288
+ 'max-lines-per-function': [
289
+ 'off',
290
+ {
291
+ max: 50,
292
+ skipBlankLines: true,
293
+ skipComments: true,
294
+ IIFEs: true,
295
+ },
296
+ ],
297
+ // specify the maximum depth callbacks can be nested
298
+ 'max-nested-callbacks': 'off',
299
+ // limits the number of parameters that can be used in the function declaration.
300
+ 'max-params': ['off', 3],
301
+ // specify the maximum number of statement allowed in a function
302
+ 'max-statements': ['off', 10],
303
+ // restrict the number of statements per line
304
+ // https://eslint.org/docs/rules/max-statements-per-line
305
+ 'max-statements-per-line': [
306
+ 'off',
307
+ {
308
+ max: 1,
309
+ },
310
+ ],
311
+ // enforce a particular style for multiline comments
312
+ // https://eslint.org/docs/rules/multiline-comment-style
313
+ 'multiline-comment-style': ['off', 'starred-block'],
314
+ // require multiline ternary
315
+ // https://eslint.org/docs/rules/multiline-ternary
316
+ 'multiline-ternary': ['off', 'never'],
317
+ // require a capital letter for constructors
318
+ 'new-cap': [
319
+ 'error',
320
+ {
321
+ newIsCap: true,
322
+ newIsCapExceptions: [],
323
+ capIsNew: false,
324
+ capIsNewExceptions: ['Immutable.Map', 'Immutable.Set', 'Immutable.List'],
325
+ },
326
+ ],
327
+ // disallow the omission of parentheses when invoking a constructor with no arguments
328
+ // https://eslint.org/docs/rules/new-parens
329
+ 'new-parens': 'error',
330
+ // allow/disallow an empty newline after var statement
331
+ 'newline-after-var': 'off',
332
+ // https://eslint.org/docs/rules/newline-before-return
333
+ 'newline-before-return': 'off',
334
+ // enforces new line after each method call in the chain to make it
335
+ // more readable and easy to maintain
336
+ // https://eslint.org/docs/rules/newline-per-chained-call
337
+ 'newline-per-chained-call': [
338
+ 'error',
339
+ {
340
+ ignoreChainWithDepth: 4,
341
+ },
342
+ ],
343
+ // disallow use of the Array constructor
344
+ 'no-array-constructor': 'error',
345
+ // disallow use of bitwise operators
346
+ // https://eslint.org/docs/rules/no-bitwise
347
+ 'no-bitwise': 'error',
348
+ // disallow use of the continue statement
349
+ // https://eslint.org/docs/rules/no-continue
350
+ 'no-continue': 'error',
351
+ // disallow comments inline after code
352
+ 'no-inline-comments': 'off',
353
+ // disallow if as the only statement in an else block
354
+ // https://eslint.org/docs/rules/no-lonely-if
355
+ 'no-lonely-if': 'error',
356
+ // disallow un-paren'd mixes of different operators
357
+ // https://eslint.org/docs/rules/no-mixed-operators
358
+ 'no-mixed-operators': [
359
+ 'error',
360
+ {
361
+ // the list of arithmetic groups disallows mixing `%` and `**`
362
+ // with other arithmetic operators.
363
+ groups: [
364
+ ['%', '**'],
365
+ ['%', '+'],
366
+ ['%', '-'],
367
+ ['%', '*'],
368
+ ['%', '/'],
369
+ ['/', '*'],
370
+ ['&', '|', '<<', '>>', '>>>'],
371
+ ['==', '!=', '===', '!=='],
372
+ ['&&', '||'],
373
+ ],
374
+ allowSamePrecedence: false,
375
+ },
376
+ ],
377
+ // disallow mixed spaces and tabs for indentation
378
+ 'no-mixed-spaces-and-tabs': 'error',
379
+ // disallow use of chained assignment expressions
380
+ // https://eslint.org/docs/rules/no-multi-assign
381
+ 'no-multi-assign': ['error'],
382
+ // disallow multiple empty lines, only one newline at the end, and no new lines at the beginning
383
+ // https://eslint.org/docs/rules/no-multiple-empty-lines
384
+ 'no-multiple-empty-lines': [
385
+ 'error',
386
+ {
387
+ max: 1,
388
+ maxBOF: 0,
389
+ maxEOF: 0,
390
+ },
391
+ ],
392
+ // disallow negated conditions
393
+ // https://eslint.org/docs/rules/no-negated-condition
394
+ 'no-negated-condition': 'off',
395
+ // disallow nested ternary expressions
396
+ 'no-nested-ternary': 'error',
397
+ // disallow use of the Object constructor
398
+ 'no-new-object': 'error',
399
+ // disallow use of unary operators, ++ and --
400
+ // https://eslint.org/docs/rules/no-plusplus
401
+ 'no-plusplus': 'error',
402
+ // disallow certain syntax forms
403
+ // https://eslint.org/docs/rules/no-restricted-syntax
404
+ 'no-restricted-syntax': [
405
+ 'error',
406
+ {
407
+ selector: 'ForInStatement',
408
+ message: 'for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.',
409
+ },
410
+ {
411
+ selector: 'ForOfStatement',
412
+ message: 'iterators/generators require regenerator-runtime, which is too heavyweight for this guide to allow them. Separately, loops should be avoided in favor of array iterations.',
413
+ },
414
+ {
415
+ selector: 'LabeledStatement',
416
+ message: 'Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.',
417
+ },
418
+ {
419
+ selector: 'WithStatement',
420
+ message: '`with` is disallowed in strict mode because it makes code impossible to predict and optimize.',
421
+ },
422
+ ],
423
+ // disallow space between function identifier and application
424
+ // deprecated in favor of func-call-spacing
425
+ 'no-spaced-func': 'off',
426
+ // disallow tab characters entirely
427
+ 'no-tabs': 'error',
428
+ // disallow the use of ternary operators
429
+ 'no-ternary': 'off',
430
+ // disallow trailing whitespace at the end of lines
431
+ 'no-trailing-spaces': [
432
+ 'error',
433
+ {
434
+ skipBlankLines: false,
435
+ ignoreComments: false,
436
+ },
437
+ ],
438
+ // disallow dangling underscores in identifiers
439
+ // https://eslint.org/docs/rules/no-underscore-dangle
440
+ 'no-underscore-dangle': [
441
+ 'error',
442
+ {
443
+ allow: [],
444
+ allowAfterThis: false,
445
+ allowAfterSuper: false,
446
+ enforceInMethodNames: true,
447
+ },
448
+ ],
449
+ // disallow the use of Boolean literals in conditional expressions
450
+ // also, prefer `a || b` over `a ? a : b`
451
+ // https://eslint.org/docs/rules/no-unneeded-ternary
452
+ 'no-unneeded-ternary': [
453
+ 'error',
454
+ {
455
+ defaultAssignment: false,
456
+ },
457
+ ],
458
+ // disallow whitespace before properties
459
+ // https://eslint.org/docs/rules/no-whitespace-before-property
460
+ 'no-whitespace-before-property': 'error',
461
+ // enforce the location of single-line statements
462
+ // https://eslint.org/docs/rules/nonblock-statement-body-position
463
+ 'nonblock-statement-body-position': [
464
+ 'error',
465
+ 'beside',
466
+ {
467
+ overrides: {},
468
+ },
469
+ ],
470
+ // require padding inside curly braces
471
+ 'object-curly-spacing': ['error', 'always'],
472
+ // enforce line breaks between braces
473
+ // https://eslint.org/docs/rules/object-curly-newline
474
+ 'object-curly-newline': [
475
+ 'error',
476
+ {
477
+ ObjectExpression: {
478
+ minProperties: 4,
479
+ multiline: true,
480
+ consistent: true,
481
+ },
482
+ ObjectPattern: {
483
+ minProperties: 4,
484
+ multiline: true,
485
+ consistent: true,
486
+ },
487
+ ImportDeclaration: {
488
+ minProperties: 4,
489
+ multiline: true,
490
+ consistent: true,
491
+ },
492
+ ExportDeclaration: {
493
+ minProperties: 4,
494
+ multiline: true,
495
+ consistent: true,
496
+ },
497
+ },
498
+ ],
499
+ // enforce "same line" or "multiple line" on object properties.
500
+ // https://eslint.org/docs/rules/object-property-newline
501
+ 'object-property-newline': [
502
+ 'error',
503
+ {
504
+ allowAllPropertiesOnSameLine: true,
505
+ },
506
+ ],
507
+ // allow just one var statement per function
508
+ 'one-var': ['error', 'never'],
509
+ // require a newline around variable declaration
510
+ // https://eslint.org/docs/rules/one-var-declaration-per-line
511
+ 'one-var-declaration-per-line': ['error', 'always'],
512
+ // require assignment operator shorthand where possible or prohibit it entirely
513
+ // https://eslint.org/docs/rules/operator-assignment
514
+ 'operator-assignment': ['error', 'always'],
515
+ // Requires operator at the beginning of the line in multiline statements
516
+ // https://eslint.org/docs/rules/operator-linebreak
517
+ 'operator-linebreak': [
518
+ 'error',
519
+ 'before',
520
+ {
521
+ overrides: {
522
+ '=': 'none',
523
+ },
524
+ },
525
+ ],
526
+ // disallow padding within blocks
527
+ 'padded-blocks': [
528
+ 'error',
529
+ {
530
+ blocks: 'never',
531
+ classes: 'never',
532
+ switches: 'never',
533
+ },
534
+ {
535
+ allowSingleLineBlocks: true,
536
+ },
537
+ ],
538
+ // Require or disallow padding lines between statements
539
+ // https://eslint.org/docs/rules/padding-line-between-statements
540
+ 'padding-line-between-statements': 'off',
541
+ // Disallow the use of Math.pow in favor of the ** operator
542
+ // https://eslint.org/docs/rules/prefer-exponentiation-operator
543
+ 'prefer-exponentiation-operator': 'error',
544
+ // Prefer use of an object spread over Object.assign
545
+ // https://eslint.org/docs/rules/prefer-object-spread
546
+ 'prefer-object-spread': 'error',
547
+ // require quotes around object literal property names
548
+ // https://eslint.org/docs/rules/quote-props.html
549
+ 'quote-props': [
550
+ 'error',
551
+ 'as-needed',
552
+ {
553
+ keywords: false,
554
+ unnecessary: true,
555
+ numbers: false,
556
+ },
557
+ ],
558
+ // specify whether double or single quotes should be used
559
+ quotes: [
560
+ 'error',
561
+ 'single',
562
+ {
563
+ avoidEscape: true,
564
+ },
565
+ ],
566
+ // do not require jsdoc
567
+ // https://eslint.org/docs/rules/require-jsdoc
568
+ 'require-jsdoc': 'off',
569
+ // require or disallow use of semicolons instead of ASI
570
+ semi: ['error', 'always'],
571
+ // enforce spacing before and after semicolons
572
+ 'semi-spacing': [
573
+ 'error',
574
+ {
575
+ before: false,
576
+ after: true,
577
+ },
578
+ ],
579
+ // Enforce location of semicolons
580
+ // https://eslint.org/docs/rules/semi-style
581
+ 'semi-style': ['error', 'last'],
582
+ // requires object keys to be sorted
583
+ 'sort-keys': [
584
+ 'off',
585
+ 'asc',
586
+ {
587
+ caseSensitive: false,
588
+ natural: true,
589
+ },
590
+ ],
591
+ // sort variables within the same declaration block
592
+ 'sort-vars': 'off',
593
+ // require or disallow space before blocks
594
+ 'space-before-blocks': 'error',
595
+ // require or disallow space before function opening parenthesis
596
+ // https://eslint.org/docs/rules/space-before-function-paren
597
+ 'space-before-function-paren': [
598
+ 'error',
599
+ {
600
+ anonymous: 'always',
601
+ named: 'never',
602
+ asyncArrow: 'always',
603
+ },
604
+ ],
605
+ // require or disallow spaces inside parentheses
606
+ 'space-in-parens': ['error', 'never'],
607
+ // require spaces around operators
608
+ 'space-infix-ops': 'error',
609
+ // Require or disallow spaces before/after unary operators
610
+ // https://eslint.org/docs/rules/space-unary-ops
611
+ 'space-unary-ops': [
612
+ 'error',
613
+ {
614
+ words: true,
615
+ nonwords: false,
616
+ overrides: {},
617
+ },
618
+ ],
619
+ // require or disallow a space immediately following the // or /* in a comment
620
+ // https://eslint.org/docs/rules/spaced-comment
621
+ 'spaced-comment': [
622
+ 'error',
623
+ 'always',
624
+ {
625
+ line: {
626
+ exceptions: ['-', '+'],
627
+ markers: ['=', '!', '/'], // space here to support sprockets directives, slash for TS /// comments
628
+ },
629
+ block: {
630
+ exceptions: ['-', '+'],
631
+ markers: ['=', '!', ':', '::'], // space here to support sprockets directives and flow comment types
632
+ balanced: true,
633
+ },
634
+ },
635
+ ],
636
+ // Enforce spacing around colons of switch statements
637
+ // https://eslint.org/docs/rules/switch-colon-spacing
638
+ 'switch-colon-spacing': [
639
+ 'error',
640
+ {
641
+ after: true,
642
+ before: false,
643
+ },
644
+ ],
645
+ // Require or disallow spacing between template tags and their literals
646
+ // https://eslint.org/docs/rules/template-tag-spacing
647
+ 'template-tag-spacing': ['error', 'never'],
648
+ // require or disallow the Unicode Byte Order Mark
649
+ // https://eslint.org/docs/rules/unicode-bom
650
+ 'unicode-bom': ['error', 'never'],
651
+ // require regex literals to be wrapped in parentheses
652
+ 'wrap-regex': 'off',
653
+ },
654
+ };
655
+ exports.default = legacyStyleRules;