@wistia/eslint-config 1.3.0 → 1.3.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @wistia/eslint-config
2
2
 
3
+ ## 1.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#410](https://github.com/wistia/eslint-config/pull/410) [`fc24518`](https://github.com/wistia/eslint-config/commit/fc245183490bca030eb167f5e982c7c273bb4851) Thanks [@okize](https://github.com/okize)! - fix: remove/hide deprecated rules
8
+
3
9
  ## 1.3.0
4
10
 
5
11
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wistia/eslint-config",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Wistia's ESLint configurations",
5
5
  "packageManager": "yarn@4.12.0",
6
6
  "type": "module",
@@ -44,8 +44,8 @@
44
44
  "@eslint/compat": "^2.0.0",
45
45
  "@eslint/js": "^9.39.2",
46
46
  "@stylistic/eslint-plugin": "^5.6.1",
47
- "@typescript-eslint/eslint-plugin": "^8.49.0",
48
- "@typescript-eslint/parser": "^8.49.0",
47
+ "@typescript-eslint/eslint-plugin": "^8.50.0",
48
+ "@typescript-eslint/parser": "^8.50.0",
49
49
  "confusing-browser-globals": "^1.0.11",
50
50
  "eslint-import-resolver-typescript": "^4.4.4",
51
51
  "eslint-plugin-barrel-files": "^3.0.1",
@@ -85,7 +85,7 @@
85
85
  "prettier": "^3.7.4",
86
86
  "storybook": "^10.1.9",
87
87
  "typescript": "^5.9.3",
88
- "vitest": "^4.0.15"
88
+ "vitest": "^4.0.16"
89
89
  },
90
90
  "peerDependencies": {
91
91
  "eslint": ">= 9",
@@ -90,7 +90,7 @@ export default {
90
90
  // disallow non-import statements appearing before import statements
91
91
  // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/imports-first.md
92
92
  // deprecated: use `import/first`
93
- 'import/imports-first': 'off',
93
+ // 'import/imports-first': 'off',
94
94
 
95
95
  // disallow duplicate imports
96
96
  // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-duplicates.md
@@ -88,9 +88,9 @@ export default {
88
88
  'n/process-exit-as-throw': 'error',
89
89
 
90
90
  // suggest correct usage of shebang
91
- // decision: turned this off because it expects files to be listed under `bin` in package.json
92
91
  // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/shebang.md
93
- 'n/shebang': 'off',
92
+ // decision: This rule is deprecated. It was replaced by n/hashbang.
93
+ // 'n/shebang': 'off',
94
94
 
95
95
  // disallow deprecated APIs
96
96
  // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-deprecated-api.md
@@ -176,7 +176,8 @@ export default {
176
176
 
177
177
  // disallow third-party modules which are hiding core modules
178
178
  // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/no-hide-core-modules.md
179
- 'n/no-hide-core-modules': 'error',
179
+ // decision: this rule is deprecated.
180
+ // 'n/no-hide-core-modules': 'error',
180
181
 
181
182
  // enforce using the node: protocol when importing Node.js builtin modules
182
183
  // https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/prefer-node-protocol.md
@@ -5,7 +5,7 @@ export default {
5
5
  // ensure emoji are accessible
6
6
  // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/accessible-emoji.md
7
7
  // disabled; rule is deprecated
8
- 'jsx-a11y/accessible-emoji': 'off',
8
+ // 'jsx-a11y/accessible-emoji': 'off',
9
9
 
10
10
  // Enforce that all elements that require alternative text have meaningful information
11
11
  // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/alt-text.md
@@ -205,7 +205,10 @@ export default {
205
205
 
206
206
  // require onBlur instead of onChange
207
207
  // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-onchange.md
208
- 'jsx-a11y/no-onchange': 'off',
208
+ // decision: This rule is deprecated. This rule is based on reports of behavior of old
209
+ // browsers (eg. IE 10 and below). In the meantime, this behavior has been corrected,
210
+ // both in newer versions of browsers as well as in the DOM spec.
211
+ // 'jsx-a11y/no-onchange': 'off',
209
212
 
210
213
  // ensure HTML elements do not specify redundant ARIA roles
211
214
  // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-redundant-roles.md
@@ -372,8 +372,8 @@ export default {
372
372
 
373
373
  // Enforce spaces before the closing bracket of self-closing JSX elements
374
374
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-space-before-closing.md
375
- // decision: disabled because this is a formatter concern
376
- 'react/jsx-space-before-closing': 'off',
375
+ // decision: this rule is deprecated. It was replaced by react/jsx-tag-spacing.
376
+ // 'react/jsx-space-before-closing': 'off',
377
377
 
378
378
  // Prevent usage of Array index in keys
379
379
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-array-index-key.md
@@ -581,9 +581,11 @@ export default {
581
581
  // decision: there's an edge case issue this could prevent but it's not common enough to warrant the rule
582
582
  'react/no-object-type-as-default-prop': 'off',
583
583
 
584
- // This rule is deprecated. It was replaced by `react/sort-default-props`
584
+ // Some developers prefer to sort defaultProps declarations alphabetically to be able to find necessary declarations easier at a later time.
585
+ // Others feel that it adds complexity and becomes a burden to maintain.
585
586
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-sort-default-props.md
586
- 'react/jsx-sort-default-props': 'off',
587
+ // decision: this rule is deprecated. It was replaced by `react/sort-default-props`
588
+ // 'react/jsx-sort-default-props': 'off',
587
589
 
588
590
  // Require all forwardRef components include a ref parameter
589
591
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/forward-ref-uses-ref.md
@@ -3,7 +3,6 @@
3
3
 
4
4
  export default {
5
5
  // plugin does not provide definitions
6
- 'styled-components-a11y/accessible-emoji': 'error',
7
6
  'styled-components-a11y/alt-text': 'error',
8
7
  'styled-components-a11y/anchor-has-content': 'error',
9
8
  'styled-components-a11y/anchor-is-valid': 'error',
@@ -70,7 +69,6 @@ export default {
70
69
  ],
71
70
  'styled-components-a11y/no-noninteractive-element-to-interactive-role': 'error',
72
71
  'styled-components-a11y/no-noninteractive-tabindex': 'error',
73
- 'styled-components-a11y/no-onchange': 'error',
74
72
  'styled-components-a11y/no-redundant-roles': 'error',
75
73
  'styled-components-a11y/no-static-element-interactions': 'error',
76
74
  'styled-components-a11y/role-has-required-aria-props': 'error',
@@ -419,7 +419,7 @@ export default {
419
419
  // Enforce JSX indentation
420
420
  // https://eslint.style/rules/default/jsx-indent
421
421
  // decision: disabled because this is a formatter concern
422
- '@stylistic/jsx-indent': 'off',
422
+ // '@stylistic/jsx-indent': 'off',
423
423
 
424
424
  // Enforce props indentation in JSX
425
425
  // https://eslint.style/rules/default/jsx-indent-props
@@ -449,7 +449,7 @@ export default {
449
449
  // Disallow multiple spaces between inline JSX props
450
450
  // https://eslint.style/rules/default/jsx-props-no-multi-spaces
451
451
  // decision: disabled because this is a formatter concern
452
- '@stylistic/jsx-props-no-multi-spaces': 'off',
452
+ // '@stylistic/jsx-props-no-multi-spaces': 'off',
453
453
 
454
454
  // Disallow extra closing tags for components without children
455
455
  // https://eslint.style/rules/default/jsx-self-closing-comp
@@ -38,9 +38,6 @@ export default {
38
38
  // decision: prefer @typescript-eslint/no-loop-func
39
39
  'no-loop-func': 'off',
40
40
 
41
- // decision: prefer @typescript-eslint/no-loss-of-precision
42
- 'no-loss-of-precision': 'off',
43
-
44
41
  // decision: prefer @typescript-eslint/no-magic-numbers
45
42
  'no-magic-numbers': 'off',
46
43
 
@@ -71,9 +68,6 @@ export default {
71
68
  // decision: prefer @typescript-eslint/require-await
72
69
  'require-await': 'off',
73
70
 
74
- // decision: prefer @typescript-eslint/return-await
75
- 'no-return-await': 'off',
76
-
77
71
  // decision: prefer @typescript-eslint/prefer-destructuring
78
72
  'prefer-destructuring': 'off',
79
73
 
@@ -271,7 +265,7 @@ export default {
271
265
  // Disallow the declaration of empty interfaces
272
266
  // https://typescript-eslint.io/rules/no-empty-interface
273
267
  // decision: this rule has been deprecated in favour of the more comprehensive @typescript-eslint/no-empty-object-type rule
274
- '@typescript-eslint/no-empty-interface': 'off',
268
+ // '@typescript-eslint/no-empty-interface': 'off',
275
269
 
276
270
  // Disallow accidentally using the "empty object" type
277
271
  // https://typescript-eslint.io/rules/no-empty-object-type
@@ -323,7 +317,8 @@ export default {
323
317
 
324
318
  // Disallow literal numbers that lose precision
325
319
  // https://typescript-eslint.io/rules/no-loss-of-precision
326
- '@typescript-eslint/no-loss-of-precision': 'error',
320
+ // decision: this rule has been deprecated because the base eslint/no-loss-of-precision rule added support for numeric separators. There is no longer any need to use this extension rule.
321
+ // '@typescript-eslint/no-loss-of-precision': 'off',
327
322
 
328
323
  // Disallow magic numbers
329
324
  // https://typescript-eslint.io/rules/no-magic-numbers
@@ -403,7 +398,7 @@ export default {
403
398
  // Disallow type aliases
404
399
  // https://typescript-eslint.io/rules/no-type-alias
405
400
  // decision: this rule has been deprecated in favour of the @typescript-eslint/consistent-type-definitions rule
406
- '@typescript-eslint/no-type-alias': 'off',
401
+ // '@typescript-eslint/no-type-alias': 'off',
407
402
 
408
403
  // Disallow unnecessary equality comparisons against boolean literals
409
404
  // https://typescript-eslint.io/rules/no-unnecessary-boolean-literal-compare
@@ -512,7 +507,7 @@ export default {
512
507
  // Disallow require statements except in import statements
513
508
  // https://typescript-eslint.io/rules/no-var-requires
514
509
  // decision: this rule has been deprecated in favour of the @typescript-eslint/no-require-imports rule.
515
- '@typescript-eslint/no-var-requires': 'off',
510
+ // '@typescript-eslint/no-var-requires': 'off',
516
511
 
517
512
  // Disallow using confusing built-in primitive class wrappers
518
513
  // https://typescript-eslint.io/rules/no-wrapper-object-types
@@ -621,7 +616,7 @@ export default {
621
616
  // Enforce using @ts-expect-error over @ts-ignore
622
617
  // https://typescript-eslint.io/rules/prefer-ts-expect-error
623
618
  // decision: this rule has been deprecated in favor of @typescript-eslint/ban-ts-comment
624
- '@typescript-eslint/prefer-ts-expect-error': 'off',
619
+ // '@typescript-eslint/prefer-ts-expect-error': 'off',
625
620
 
626
621
  // Require any function or method that returns a Promise to be marked async
627
622
  // https://typescript-eslint.io/rules/promise-function-async
@@ -649,7 +644,8 @@ export default {
649
644
 
650
645
  // Enforce constituents of a type union/intersection to be sorted alphabetically
651
646
  // https://typescript-eslint.io/rules/sort-type-constituents
652
- '@typescript-eslint/sort-type-constituents': 'error',
647
+ // decision: this rule has been deprecated in favor of the perfectionist/sort-intersection-types and perfectionist/sort-union-types rules.
648
+ // '@typescript-eslint/sort-type-constituents': 'error',
653
649
 
654
650
  // Disallow certain types in boolean expressions
655
651
  // https://typescript-eslint.io/rules/strict-boolean-expressions
@@ -670,7 +666,10 @@ export default {
670
666
 
671
667
  // Require type annotations in certain places
672
668
  // https://typescript-eslint.io/rules/typedef
673
- '@typescript-eslint/typedef': 'error',
669
+ // decision: deprecated because equiring type annotations unnecessarily can be cumbersome to maintain and
670
+ // generally reduces code readability. TypeScript is often better at inferring types than easily written
671
+ // type annotations would allow.
672
+ // '@typescript-eslint/typedef': 'error',
674
673
 
675
674
  // Enforce unbound methods are called with their expected scope
676
675
  // https://typescript-eslint.io/rules/unbound-method
@@ -58,7 +58,8 @@ export default {
58
58
 
59
59
  // Disallow using a callback in asynchronous tests and hooks
60
60
  // https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-done-callback.md
61
- 'vitest/no-done-callback': 'error',
61
+ // decision: this rule is deprecated.
62
+ // 'vitest/no-done-callback': 'error',
62
63
 
63
64
  // Disallow duplicate hooks and teardown hooks
64
65
  // https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-duplicate-hooks.md
@@ -178,9 +178,6 @@
178
178
  "@stylistic/jsx-function-call-newline": [
179
179
  0,
180
180
  ],
181
- "@stylistic/jsx-indent": [
182
- 0,
183
- ],
184
181
  "@stylistic/jsx-indent-props": [
185
182
  0,
186
183
  ],
@@ -196,9 +193,6 @@
196
193
  "@stylistic/jsx-pascal-case": [
197
194
  0,
198
195
  ],
199
- "@stylistic/jsx-props-no-multi-spaces": [
200
- 0,
201
- ],
202
196
  "@stylistic/jsx-quotes": [
203
197
  0,
204
198
  ],
@@ -618,9 +612,6 @@
618
612
  "import/group-exports": [
619
613
  0,
620
614
  ],
621
- "import/imports-first": [
622
- 0,
623
- ],
624
615
  "import/max-dependencies": [
625
616
  0,
626
617
  {
@@ -144,9 +144,6 @@
144
144
  "n/no-extraneous-require": [
145
145
  0,
146
146
  ],
147
- "n/no-hide-core-modules": [
148
- 2,
149
- ],
150
147
  "n/no-missing-import": [
151
148
  0,
152
149
  ],
@@ -233,8 +230,5 @@
233
230
  "n/process-exit-as-throw": [
234
231
  2,
235
232
  ],
236
- "n/shebang": [
237
- 0,
238
- ],
239
233
  },
240
234
  }
@@ -1218,9 +1218,6 @@
1218
1218
  "ignoreOverrideMethods": false,
1219
1219
  },
1220
1220
  ],
1221
- "jsx-a11y/accessible-emoji": [
1222
- 0,
1223
- ],
1224
1221
  "jsx-a11y/alt-text": [
1225
1222
  2,
1226
1223
  {
@@ -1451,9 +1448,6 @@
1451
1448
  "tags": [],
1452
1449
  },
1453
1450
  ],
1454
- "jsx-a11y/no-onchange": [
1455
- 0,
1456
- ],
1457
1451
  "jsx-a11y/no-redundant-roles": [
1458
1452
  2,
1459
1453
  ],
@@ -1766,9 +1760,6 @@
1766
1760
  "react/jsx-props-no-spreading": [
1767
1761
  0,
1768
1762
  ],
1769
- "react/jsx-sort-default-props": [
1770
- 0,
1771
- ],
1772
1763
  "react/jsx-sort-prop-types": [
1773
1764
  0,
1774
1765
  ],
@@ -1785,9 +1776,6 @@
1785
1776
  "shorthandLast": false,
1786
1777
  },
1787
1778
  ],
1788
- "react/jsx-space-before-closing": [
1789
- 0,
1790
- ],
1791
1779
  "react/jsx-tag-spacing": [
1792
1780
  0,
1793
1781
  ],
@@ -19,9 +19,6 @@
19
19
  "styled-components-a11y:eslint-plugin-styled-components-a11y@2.2.1",
20
20
  ],
21
21
  "rules": {
22
- "styled-components-a11y/accessible-emoji": [
23
- 2,
24
- ],
25
22
  "styled-components-a11y/alt-text": [
26
23
  2,
27
24
  ],
@@ -154,9 +151,6 @@
154
151
  "styled-components-a11y/no-noninteractive-tabindex": [
155
152
  2,
156
153
  ],
157
- "styled-components-a11y/no-onchange": [
158
- 2,
159
- ],
160
154
  "styled-components-a11y/no-redundant-roles": [
161
155
  2,
162
156
  ],
@@ -64,7 +64,7 @@
64
64
  "undefined": false,
65
65
  "unescape": false,
66
66
  },
67
- "parser": "typescript-eslint/parser@8.49.0",
67
+ "parser": "typescript-eslint/parser@8.50.0",
68
68
  "parserOptions": {
69
69
  "ecmaVersion": 2024,
70
70
  "project": "./tsconfig.json",
@@ -78,7 +78,7 @@
78
78
  "plugins": [
79
79
  "@",
80
80
  "@stylistic",
81
- "@typescript-eslint:@typescript-eslint/eslint-plugin@8.49.0",
81
+ "@typescript-eslint:@typescript-eslint/eslint-plugin@8.50.0",
82
82
  "barrel-files:eslint-plugin-barrel-files@3.0.1",
83
83
  "filenames",
84
84
  "import",
@@ -180,9 +180,6 @@
180
180
  "@stylistic/jsx-function-call-newline": [
181
181
  0,
182
182
  ],
183
- "@stylistic/jsx-indent": [
184
- 0,
185
- ],
186
183
  "@stylistic/jsx-indent-props": [
187
184
  0,
188
185
  ],
@@ -198,9 +195,6 @@
198
195
  "@stylistic/jsx-pascal-case": [
199
196
  0,
200
197
  ],
201
- "@stylistic/jsx-props-no-multi-spaces": [
202
- 0,
203
- ],
204
198
  "@stylistic/jsx-quotes": [
205
199
  0,
206
200
  ],
@@ -531,9 +525,6 @@
531
525
  "allow": [],
532
526
  },
533
527
  ],
534
- "@typescript-eslint/no-empty-interface": [
535
- 0,
536
- ],
537
528
  "@typescript-eslint/no-empty-object-type": [
538
529
  2,
539
530
  ],
@@ -573,9 +564,6 @@
573
564
  "@typescript-eslint/no-loop-func": [
574
565
  2,
575
566
  ],
576
- "@typescript-eslint/no-loss-of-precision": [
577
- 2,
578
- ],
579
567
  "@typescript-eslint/no-magic-numbers": [
580
568
  2,
581
569
  {
@@ -651,9 +639,6 @@
651
639
  "@typescript-eslint/no-this-alias": [
652
640
  2,
653
641
  ],
654
- "@typescript-eslint/no-type-alias": [
655
- 0,
656
- ],
657
642
  "@typescript-eslint/no-unnecessary-boolean-literal-compare": [
658
643
  2,
659
644
  ],
@@ -740,9 +725,6 @@
740
725
  "@typescript-eslint/no-useless-empty-export": [
741
726
  2,
742
727
  ],
743
- "@typescript-eslint/no-var-requires": [
744
- 0,
745
- ],
746
728
  "@typescript-eslint/no-wrapper-object-types": [
747
729
  2,
748
730
  ],
@@ -822,9 +804,6 @@
822
804
  "@typescript-eslint/prefer-string-starts-ends-with": [
823
805
  2,
824
806
  ],
825
- "@typescript-eslint/prefer-ts-expect-error": [
826
- 0,
827
- ],
828
807
  "@typescript-eslint/promise-function-async": [
829
808
  2,
830
809
  ],
@@ -846,9 +825,6 @@
846
825
  "@typescript-eslint/return-await": [
847
826
  2,
848
827
  ],
849
- "@typescript-eslint/sort-type-constituents": [
850
- 2,
851
- ],
852
828
  "@typescript-eslint/strict-boolean-expressions": [
853
829
  2,
854
830
  {
@@ -861,9 +837,6 @@
861
837
  "@typescript-eslint/triple-slash-reference": [
862
838
  2,
863
839
  ],
864
- "@typescript-eslint/typedef": [
865
- 2,
866
- ],
867
840
  "@typescript-eslint/unbound-method": [
868
841
  2,
869
842
  ],
@@ -1090,9 +1063,6 @@
1090
1063
  "import/group-exports": [
1091
1064
  0,
1092
1065
  ],
1093
- "import/imports-first": [
1094
- 0,
1095
- ],
1096
1066
  "import/max-dependencies": [
1097
1067
  0,
1098
1068
  {
@@ -1562,7 +1532,7 @@
1562
1532
  0,
1563
1533
  ],
1564
1534
  "no-loss-of-precision": [
1565
- 0,
1535
+ 2,
1566
1536
  ],
1567
1537
  "no-magic-numbers": [
1568
1538
  0,
@@ -1994,9 +1964,6 @@
1994
1964
  2,
1995
1965
  "always",
1996
1966
  ],
1997
- "no-return-await": [
1998
- 0,
1999
- ],
2000
1967
  "no-script-url": [
2001
1968
  2,
2002
1969
  ],
@@ -101,9 +101,6 @@
101
101
  "vitest/no-disabled-tests": [
102
102
  0,
103
103
  ],
104
- "vitest/no-done-callback": [
105
- 2,
106
- ],
107
104
  "vitest/no-duplicate-hooks": [
108
105
  2,
109
106
  ],