@wistia/oxlint-config 0.4.6 → 0.5.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wistia/oxlint-config",
3
- "version": "0.4.6",
3
+ "version": "0.5.0",
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.2",
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.31.0",
58
- "eslint": "^10.2.1",
59
- "oxfmt": "^0.46.0",
60
- "oxlint": "^1.61.0",
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.5"
79
+ "vitest": "^4.1.4"
64
80
  },
65
81
  "engines": {
66
82
  "node": "^20.19.0 || ^22.13.0 || >=24 || >=26"
package/rules/base.mjs CHANGED
@@ -389,14 +389,8 @@ export const baseRules = {
389
389
 
390
390
  // Disallow magic numbers
391
391
  // https://eslint.org/docs/rules/no-magic-numbers
392
- 'eslint/no-magic-numbers': [
393
- 'error',
394
- {
395
- ignore: [-1, 0, 1, 2, 3, 4, 5, 100, 1024, 1000, 10000],
396
- ignoreArrayIndexes: true,
397
- ignoreDefaultValues: true,
398
- },
399
- ],
392
+ // decision:
393
+ 'eslint/no-magic-numbers': 'off',
400
394
 
401
395
  // Disallow use of chained assignment expressions
402
396
  // https://eslint.org/docs/rules/no-multi-assign
@@ -1,16 +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/require-await': 'off',
6
-
7
- // recommended to be disabled for TypeScript projects
8
- // 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
9
- 'eslint/no-undef': 'off',
10
-
11
- // Override base no-void to allow void as a statement (common in TS for fire-and-forget promises)
12
- 'eslint/no-void': ['error', { allowAsStatement: true }],
13
-
14
4
  // Override base id-length to disable checking generic type parameters.
15
5
  // ESLint's id-length never sees TS type params (they're not in the ESLint AST),
16
6
  // but oxlint has native TS support so it checks them. Setting checkGeneric to
@@ -25,6 +15,19 @@ export const typescriptRules = {
25
15
  },
26
16
  ],
27
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
+
28
31
  // Require that function overload signatures be consecutive
29
32
  // https://typescript-eslint.io/rules/adjacent-overload-signatures
30
33
  'typescript/adjacent-overload-signatures': 'error',