@wistia/eslint-config 0.20.0 → 0.21.0
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/package.json +22 -22
- package/rules/eslint/typescript.js +45 -16
- package/yarn-error.log +0 -5375
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wistia/eslint-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.0",
|
|
4
4
|
"description": "Wistia's ESLint configurations",
|
|
5
5
|
"main": "react.js",
|
|
6
6
|
"exports": {
|
|
@@ -30,25 +30,25 @@
|
|
|
30
30
|
"test:stylelint": "stylelint --print-config ./test/index.js"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@babel/core": "^7.
|
|
34
|
-
"@babel/eslint-parser": "^7.
|
|
35
|
-
"@babel/preset-react": "^7.
|
|
36
|
-
"@rushstack/eslint-patch": "^1.2
|
|
37
|
-
"@testing-library/dom": "^9.3.
|
|
38
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
39
|
-
"@typescript-eslint/parser": "^
|
|
33
|
+
"@babel/core": "^7.22.9",
|
|
34
|
+
"@babel/eslint-parser": "^7.22.9",
|
|
35
|
+
"@babel/preset-react": "^7.22.5",
|
|
36
|
+
"@rushstack/eslint-patch": "^1.3.2",
|
|
37
|
+
"@testing-library/dom": "^9.3.1",
|
|
38
|
+
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
39
|
+
"@typescript-eslint/parser": "^6.0.0",
|
|
40
40
|
"confusing-browser-globals": "^1.0.11",
|
|
41
|
-
"eslint": "^8.
|
|
41
|
+
"eslint": "^8.45.0",
|
|
42
42
|
"eslint-config-prettier": "^8.8.0",
|
|
43
43
|
"eslint-import-resolver-typescript": "^3.5.5",
|
|
44
44
|
"eslint-plugin-better-styled-components": "^1.1.2",
|
|
45
|
-
"eslint-plugin-cypress": "^2.13.
|
|
45
|
+
"eslint-plugin-cypress": "^2.13.3",
|
|
46
46
|
"eslint-plugin-filenames": "^1.3.2",
|
|
47
47
|
"eslint-plugin-import": "^2.27.5",
|
|
48
|
-
"eslint-plugin-jest": "^27.2.
|
|
48
|
+
"eslint-plugin-jest": "^27.2.3",
|
|
49
49
|
"eslint-plugin-jest-dom": "^5.0.1",
|
|
50
50
|
"eslint-plugin-jest-formatting": "^3.1.0",
|
|
51
|
-
"eslint-plugin-jsdoc": "^46.
|
|
51
|
+
"eslint-plugin-jsdoc": "^46.4.4",
|
|
52
52
|
"eslint-plugin-jsx-a11y": "^6.7.1",
|
|
53
53
|
"eslint-plugin-no-only-tests": "^3.1.0",
|
|
54
54
|
"eslint-plugin-no-snapshot-testing": "^1.0.61",
|
|
@@ -58,27 +58,27 @@
|
|
|
58
58
|
"eslint-plugin-react": "^7.32.2",
|
|
59
59
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
60
60
|
"eslint-plugin-sonarjs": "^0.19.0",
|
|
61
|
-
"eslint-plugin-storybook": "^0.6.
|
|
62
|
-
"eslint-plugin-styled-components-a11y": "^2.
|
|
63
|
-
"eslint-plugin-testing-library": "^5.
|
|
64
|
-
"postcss": "^8.4.
|
|
61
|
+
"eslint-plugin-storybook": "^0.6.12",
|
|
62
|
+
"eslint-plugin-styled-components-a11y": "^2.1.3",
|
|
63
|
+
"eslint-plugin-testing-library": "^5.11.0",
|
|
64
|
+
"postcss": "^8.4.26",
|
|
65
65
|
"postcss-scss": "^4.0.6",
|
|
66
66
|
"postcss-styled-syntax": "^0.4.0",
|
|
67
67
|
"prettier": "^3.0.0",
|
|
68
|
-
"stylelint": "^15.
|
|
68
|
+
"stylelint": "^15.10.1",
|
|
69
69
|
"stylelint-config-prettier": "^9.0.5",
|
|
70
70
|
"stylelint-declaration-block-no-ignored-properties": "^2.7.0",
|
|
71
71
|
"stylelint-prettier": "^4.0.0",
|
|
72
|
-
"stylelint-scss": "^5.0.
|
|
72
|
+
"stylelint-scss": "^5.0.1"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
|
-
"@commitlint/cli": "^17.
|
|
76
|
-
"@commitlint/config-conventional": "^17.
|
|
75
|
+
"@commitlint/cli": "^17.6.6",
|
|
76
|
+
"@commitlint/config-conventional": "^17.6.6",
|
|
77
77
|
"check-export-map": "^1.3.0",
|
|
78
78
|
"husky": "^8.0.3",
|
|
79
|
-
"jest": "^29.
|
|
79
|
+
"jest": "^29.6.1",
|
|
80
80
|
"jest-specific-snapshot": "^8.0.0",
|
|
81
|
-
"typescript": "^5.
|
|
81
|
+
"typescript": "^5.1.6"
|
|
82
82
|
},
|
|
83
83
|
"engines": {
|
|
84
84
|
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
|
@@ -8,6 +8,9 @@ module.exports = {
|
|
|
8
8
|
// the following rules are deliberately disabled (as they may be inherited from other rulesets (eg. best-practices.js)) because
|
|
9
9
|
// they have equivalent rules below that are considered "extension rules" by @typescript-eslint
|
|
10
10
|
|
|
11
|
+
// prefer @typescript-eslint/block-spacing
|
|
12
|
+
'block-spacing': 'off',
|
|
13
|
+
|
|
11
14
|
// prefer @typescript-eslint/default-param-last
|
|
12
15
|
'default-param-last': 'off',
|
|
13
16
|
|
|
@@ -17,6 +20,12 @@ module.exports = {
|
|
|
17
20
|
// prefer @typescript-eslint/init-declarations
|
|
18
21
|
'init-declarations': 'off',
|
|
19
22
|
|
|
23
|
+
// prefer @typescript-eslint/key-spacing
|
|
24
|
+
'key-spacing': 'off',
|
|
25
|
+
|
|
26
|
+
// prefer @typescript-eslint/lines-around-comment
|
|
27
|
+
'lines-around-comment': 'off',
|
|
28
|
+
|
|
20
29
|
// prefer @typescript-eslint/no-array-constructor
|
|
21
30
|
'no-array-constructor': 'off',
|
|
22
31
|
|
|
@@ -219,10 +228,6 @@ module.exports = {
|
|
|
219
228
|
// https://typescript-eslint.io/rules/no-for-in-array
|
|
220
229
|
'@typescript-eslint/no-for-in-array': 'error',
|
|
221
230
|
|
|
222
|
-
// Disallow usage of the implicit <code>any</code> type in catch clauses
|
|
223
|
-
// https://typescript-eslint.io/rules/no-implicit-any-catch
|
|
224
|
-
'@typescript-eslint/no-implicit-any-catch': 'error',
|
|
225
|
-
|
|
226
231
|
// Disallow explicit type declarations for variables or parameters initialized to a number, string, or boolean
|
|
227
232
|
// https://typescript-eslint.io/rules/no-inferrable-types
|
|
228
233
|
'@typescript-eslint/no-inferrable-types': 'error',
|
|
@@ -259,10 +264,6 @@ module.exports = {
|
|
|
259
264
|
// https://typescript-eslint.io/rules/no-non-null-assertion
|
|
260
265
|
'@typescript-eslint/no-non-null-assertion': 'error',
|
|
261
266
|
|
|
262
|
-
// Disallow the use of parameter properties in class constructors
|
|
263
|
-
// https://typescript-eslint.io/rules/no-parameter-properties
|
|
264
|
-
'@typescript-eslint/no-parameter-properties': 'error',
|
|
265
|
-
|
|
266
267
|
// Disallow members of unions and intersections that do nothing or override type information
|
|
267
268
|
// https://typescript-eslint.io/rules/no-redundant-type-constituents
|
|
268
269
|
'@typescript-eslint/no-redundant-type-constituents': 'error',
|
|
@@ -421,10 +422,6 @@ module.exports = {
|
|
|
421
422
|
// https://typescript-eslint.io/rules/restrict-template-expressions
|
|
422
423
|
'@typescript-eslint/restrict-template-expressions': 'error',
|
|
423
424
|
|
|
424
|
-
// Enforce members of a type union/intersection to be sorted alphabetically
|
|
425
|
-
// https://typescript-eslint.io/rules/sort-type-union-intersection-members
|
|
426
|
-
'@typescript-eslint/sort-type-union-intersection-members': 'error',
|
|
427
|
-
|
|
428
425
|
// Disallow certain types in boolean expressions
|
|
429
426
|
// https://typescript-eslint.io/rules/strict-boolean-expressions
|
|
430
427
|
'@typescript-eslint/strict-boolean-expressions': [
|
|
@@ -511,10 +508,6 @@ module.exports = {
|
|
|
511
508
|
// https://typescript-eslint.io/rules/no-dupe-class-members
|
|
512
509
|
'@typescript-eslint/no-dupe-class-members': 'error',
|
|
513
510
|
|
|
514
|
-
// Disallow duplicate imports
|
|
515
|
-
// https://typescript-eslint.io/rules/no-duplicate-imports
|
|
516
|
-
'@typescript-eslint/no-duplicate-imports': 'error',
|
|
517
|
-
|
|
518
511
|
// Disallow empty functions
|
|
519
512
|
// https://typescript-eslint.io/rules/no-empty-function
|
|
520
513
|
'@typescript-eslint/no-empty-function': 'error',
|
|
@@ -633,5 +626,41 @@ module.exports = {
|
|
|
633
626
|
// Require spacing around infix operators
|
|
634
627
|
// https://typescript-eslint.io/rules/space-infix-ops
|
|
635
628
|
'@typescript-eslint/space-infix-ops': 'off',
|
|
629
|
+
|
|
630
|
+
// Disallow duplicate constituents of union or intersection types
|
|
631
|
+
// https://typescript-eslint.io/rules/no-duplicate-type-constituents/
|
|
632
|
+
'@typescript-eslint/no-duplicate-type-constituents': 'error',
|
|
633
|
+
|
|
634
|
+
// Enforce the use of top-level import type qualifier when an import only has specifiers with inline type qualifiers
|
|
635
|
+
// https://typescript-eslint.io/rules/no-import-type-side-effects/
|
|
636
|
+
'@typescript-eslint/no-import-type-side-effects': 'error',
|
|
637
|
+
|
|
638
|
+
// Disallow enums from having both number and string members
|
|
639
|
+
// https://typescript-eslint.io/rules/no-mixed-enums/
|
|
640
|
+
'@typescript-eslint/no-mixed-enums': 'error',
|
|
641
|
+
|
|
642
|
+
// Disallow unsafe declaration merging
|
|
643
|
+
// https://typescript-eslint.io/rules/no-unsafe-declaration-merging/
|
|
644
|
+
'@typescript-eslint/no-unsafe-declaration-merging': 'error',
|
|
645
|
+
|
|
646
|
+
// Disallow comparing an enum value with a non-enum value
|
|
647
|
+
// https://typescript-eslint.io/rules/no-unsafe-enum-comparison/
|
|
648
|
+
'@typescript-eslint/no-unsafe-enum-comparison': 'error',
|
|
649
|
+
|
|
650
|
+
// Enforce constituents of a type union/intersection to be sorted alphabetically
|
|
651
|
+
// https://typescript-eslint.io/rules/sort-type-constituents/
|
|
652
|
+
'@typescript-eslint/sort-type-constituents': 'error',
|
|
653
|
+
|
|
654
|
+
// Disallow or enforce spaces inside of blocks after opening block and before closing block
|
|
655
|
+
// https://typescript-eslint.io/rules/block-spacing/
|
|
656
|
+
'@typescript-eslint/block-spacing': 'error',
|
|
657
|
+
|
|
658
|
+
// Enforce consistent spacing between property names and type annotations in types and interfaces
|
|
659
|
+
// https://typescript-eslint.io/rules/key-spacing/
|
|
660
|
+
'@typescript-eslint/key-spacing': 'error',
|
|
661
|
+
|
|
662
|
+
// Require empty lines around comments
|
|
663
|
+
// https://typescript-eslint.io/rules/lines-around-comment/
|
|
664
|
+
'@typescript-eslint/lines-around-comment': 'error',
|
|
636
665
|
},
|
|
637
666
|
};
|