@wistia/oxlint-config 0.4.5 → 0.4.7
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 +26 -10
- package/rules/typescript.mjs +13 -29
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wistia/oxlint-config",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.7",
|
|
4
4
|
"description": "Wistia's Oxlint configurations",
|
|
5
5
|
"packageManager": "yarn@4.14.1",
|
|
6
6
|
"type": "module",
|
|
@@ -16,13 +16,29 @@
|
|
|
16
16
|
"types": "./index.d.mts",
|
|
17
17
|
"default": "./index.mjs"
|
|
18
18
|
},
|
|
19
|
-
"./configs/*": "./configs/*",
|
|
20
|
-
"./rules/*": "./rules/*",
|
|
21
19
|
"./javascript": "./configs/javascript.mjs",
|
|
22
20
|
"./typescript": "./configs/typescript.mjs",
|
|
23
21
|
"./react": "./configs/react.mjs",
|
|
24
22
|
"./node": "./configs/node.mjs",
|
|
25
|
-
"./vitest": "./configs/vitest.mjs"
|
|
23
|
+
"./vitest": "./configs/vitest.mjs",
|
|
24
|
+
"./playwright": "./configs/playwright.mjs",
|
|
25
|
+
"./storybook": "./configs/storybook.mjs",
|
|
26
|
+
"./styled-components": "./configs/styled-components.mjs",
|
|
27
|
+
"./testing-library": "./configs/testing-library.mjs",
|
|
28
|
+
"./rules/barrel-files": "./rules/barrel-files.mjs",
|
|
29
|
+
"./rules/base": "./rules/base.mjs",
|
|
30
|
+
"./rules/import": "./rules/import.mjs",
|
|
31
|
+
"./rules/node": "./rules/node.mjs",
|
|
32
|
+
"./rules/playwright": "./rules/playwright.mjs",
|
|
33
|
+
"./rules/promise": "./rules/promise.mjs",
|
|
34
|
+
"./rules/react-a11y": "./rules/react-a11y.mjs",
|
|
35
|
+
"./rules/react": "./rules/react.mjs",
|
|
36
|
+
"./rules/storybook": "./rules/storybook.mjs",
|
|
37
|
+
"./rules/styled-components": "./rules/styled-components.mjs",
|
|
38
|
+
"./rules/testing-library": "./rules/testing-library.mjs",
|
|
39
|
+
"./rules/typescript": "./rules/typescript.mjs",
|
|
40
|
+
"./rules/unicorn": "./rules/unicorn.mjs",
|
|
41
|
+
"./rules/vitest": "./rules/vitest.mjs"
|
|
26
42
|
},
|
|
27
43
|
"scripts": {
|
|
28
44
|
"changeset": "changeset",
|
|
@@ -45,7 +61,7 @@
|
|
|
45
61
|
"eslint-plugin-jest-dom": "^5.5.0",
|
|
46
62
|
"eslint-plugin-n": "^17.24.0",
|
|
47
63
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
48
|
-
"eslint-plugin-playwright": "^2.10.
|
|
64
|
+
"eslint-plugin-playwright": "^2.10.1",
|
|
49
65
|
"eslint-plugin-storybook": "^10.3.5",
|
|
50
66
|
"eslint-plugin-styled-components": "^0.0.0",
|
|
51
67
|
"eslint-plugin-styled-components-a11y": "^2.2.1",
|
|
@@ -54,13 +70,13 @@
|
|
|
54
70
|
},
|
|
55
71
|
"devDependencies": {
|
|
56
72
|
"@changesets/changelog-github": "^0.6.0",
|
|
57
|
-
"@changesets/cli": "^2.
|
|
58
|
-
"eslint": "^10.2.
|
|
59
|
-
"oxfmt": "^0.
|
|
60
|
-
"oxlint": "^1.
|
|
73
|
+
"@changesets/cli": "^2.30.0",
|
|
74
|
+
"eslint": "^10.2.0",
|
|
75
|
+
"oxfmt": "^0.45.0",
|
|
76
|
+
"oxlint": "^1.60.0",
|
|
61
77
|
"oxlint-tsgolint": "^0.21.1",
|
|
62
78
|
"storybook": "^10.3.5",
|
|
63
|
-
"vitest": "^4.1.
|
|
79
|
+
"vitest": "^4.1.4"
|
|
64
80
|
},
|
|
65
81
|
"engines": {
|
|
66
82
|
"node": "^20.19.0 || ^22.13.0 || >=24 || >=26"
|
package/rules/typescript.mjs
CHANGED
|
@@ -1,35 +1,6 @@
|
|
|
1
1
|
export const typescriptRules = {
|
|
2
2
|
plugins: ['typescript'],
|
|
3
3
|
rules: {
|
|
4
|
-
//Disable base eslint rules superseded by typescript equivalents --
|
|
5
|
-
'eslint/class-methods-use-this': 'off',
|
|
6
|
-
'eslint/default-param-last': 'off',
|
|
7
|
-
'eslint/init-declarations': 'off',
|
|
8
|
-
'eslint/max-params': 'off',
|
|
9
|
-
'eslint/no-array-constructor': 'off',
|
|
10
|
-
'eslint/no-dupe-class-members': 'off',
|
|
11
|
-
'eslint/no-empty-function': 'off',
|
|
12
|
-
'eslint/no-loop-func': 'off',
|
|
13
|
-
'eslint/no-magic-numbers': 'off',
|
|
14
|
-
'eslint/no-redeclare': 'off',
|
|
15
|
-
'eslint/no-restricted-imports': 'off',
|
|
16
|
-
'eslint/no-shadow': 'off',
|
|
17
|
-
'eslint/no-throw-literal': 'off',
|
|
18
|
-
'eslint/no-unused-expressions': 'off',
|
|
19
|
-
'eslint/no-unused-private-class-members': 'off',
|
|
20
|
-
'eslint/no-unused-vars': 'off',
|
|
21
|
-
'eslint/no-use-before-define': 'off',
|
|
22
|
-
'eslint/no-useless-constructor': 'off',
|
|
23
|
-
'eslint/prefer-destructuring': 'off',
|
|
24
|
-
'eslint/require-await': 'off',
|
|
25
|
-
|
|
26
|
-
// recommended to be disabled for TypeScript projects
|
|
27
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/main/docs/linting/TROUBLESHOOTING.md#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors
|
|
28
|
-
'eslint/no-undef': 'off',
|
|
29
|
-
|
|
30
|
-
// Override base no-void to allow void as a statement (common in TS for fire-and-forget promises)
|
|
31
|
-
'eslint/no-void': ['error', { allowAsStatement: true }],
|
|
32
|
-
|
|
33
4
|
// Override base id-length to disable checking generic type parameters.
|
|
34
5
|
// ESLint's id-length never sees TS type params (they're not in the ESLint AST),
|
|
35
6
|
// but oxlint has native TS support so it checks them. Setting checkGeneric to
|
|
@@ -44,6 +15,19 @@ export const typescriptRules = {
|
|
|
44
15
|
},
|
|
45
16
|
],
|
|
46
17
|
|
|
18
|
+
// This is redundant with TypeScript's noUnusedLocals/noUnusedParameters compiler options
|
|
19
|
+
'eslint/no-unused-vars': 'off',
|
|
20
|
+
|
|
21
|
+
// Recommended to be disabled for TypeScript projects
|
|
22
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/docs/linting/TROUBLESHOOTING.md#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors
|
|
23
|
+
'eslint/no-undef': 'off',
|
|
24
|
+
|
|
25
|
+
// Override base no-void to allow void as a statement (common in TS for fire-and-forget promises)
|
|
26
|
+
'eslint/no-void': ['error', { allowAsStatement: true }],
|
|
27
|
+
|
|
28
|
+
// Superseded by `typescript/require-await` below
|
|
29
|
+
'eslint/require-await': 'off',
|
|
30
|
+
|
|
47
31
|
// Require that function overload signatures be consecutive
|
|
48
32
|
// https://typescript-eslint.io/rules/adjacent-overload-signatures
|
|
49
33
|
'typescript/adjacent-overload-signatures': 'error',
|