@wistia/oxlint-config 1.9.0 → 1.10.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/README.md CHANGED
@@ -12,7 +12,7 @@ Wistia's Oxlint configurations. This is a shared config package for [oxlint](htt
12
12
  ## How to install
13
13
 
14
14
  ```bash
15
- yarn add -D @wistia/oxlint-config oxlint eslint
15
+ yarn add -D @wistia/oxlint-config oxlint oxlint-tsgolint eslint
16
16
  ```
17
17
 
18
18
  > **Why `eslint`?** This package uses oxlint's [jsPlugins](https://oxc.rs/docs/guide/usage/linter/js-plugins) feature to run ESLint plugins (e.g. `eslint-plugin-import-x`, `@eslint-react/eslint-plugin`, `eslint-plugin-testing-library`, etc.) natively inside oxlint. These plugins import utilities from the `eslint` package at runtime, so it must be installed even though you won't run `eslint` directly.
package/package.json CHANGED
@@ -1,9 +1,24 @@
1
1
  {
2
2
  "name": "@wistia/oxlint-config",
3
- "version": "1.9.0",
3
+ "version": "1.10.0",
4
4
  "description": "Wistia's Oxlint configurations",
5
- "packageManager": "yarn@4.17.1",
6
- "type": "module",
5
+ "keywords": [
6
+ "linter",
7
+ "oxfmt",
8
+ "oxlint",
9
+ "oxlint-config",
10
+ "typescript"
11
+ ],
12
+ "homepage": "https://github.com/wistia/oxlint-config#readme",
13
+ "bugs": {
14
+ "url": "https://github.com/wistia/oxlint-config/issues"
15
+ },
16
+ "license": "MIT",
17
+ "author": "Wistia Engineering",
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git+https://github.com/wistia/oxlint-config.git"
21
+ },
7
22
  "files": [
8
23
  "/configs",
9
24
  "/rules",
@@ -14,6 +29,7 @@
14
29
  "/oxfmtConfig.d.mts",
15
30
  "/resolve-plugin.mjs"
16
31
  ],
32
+ "type": "module",
17
33
  "exports": {
18
34
  "./package.json": "./package.json",
19
35
  ".": {
@@ -59,28 +75,17 @@
59
75
  "test": "vitest run --exclude test/validate-configs.test.mjs",
60
76
  "validate": "vitest run test/validate-configs.test.mjs"
61
77
  },
62
- "peerDependencies": {
63
- "eslint": ">= 10.6.0",
64
- "oxfmt": ">= 0.58.0",
65
- "oxlint": ">= 1.73.0",
66
- "oxlint-tsgolint": ">= 0.24.0"
67
- },
68
- "peerDependenciesMeta": {
69
- "oxfmt": {
70
- "optional": true
71
- }
72
- },
73
78
  "dependencies": {
74
- "@eslint-react/eslint-plugin": "^5.11.3",
75
- "@vitest/eslint-plugin": "^1.6.21",
79
+ "@eslint-react/eslint-plugin": "^5.17.3",
80
+ "@vitest/eslint-plugin": "^1.6.23",
76
81
  "confusing-browser-globals": "^1.0.11",
77
82
  "eslint-plugin-barrel-files": "^3.0.1",
78
83
  "eslint-plugin-import-x": "^4.17.1",
79
84
  "eslint-plugin-jest-dom": "^5.5.0",
80
- "eslint-plugin-n": "^18.2.1",
85
+ "eslint-plugin-n": "^18.2.2",
81
86
  "eslint-plugin-no-only-tests": "^3.4.0",
82
87
  "eslint-plugin-playwright": "^2.10.5",
83
- "eslint-plugin-storybook": "^10.4.6",
88
+ "eslint-plugin-storybook": "^10.5.3",
84
89
  "eslint-plugin-styled-components": "^0.0.0",
85
90
  "eslint-plugin-styled-components-a11y": "^2.2.1",
86
91
  "eslint-plugin-testing-library": "^7.16.2",
@@ -88,31 +93,27 @@
88
93
  },
89
94
  "devDependencies": {
90
95
  "@changesets/changelog-github": "^0.7.0",
91
- "@changesets/cli": "^2.31.0",
92
- "eslint": "^10.6.0",
93
- "oxfmt": "^0.58.0",
94
- "oxlint": "^1.73.0",
95
- "oxlint-tsgolint": "^0.24.0",
96
- "storybook": "^10.4.6",
96
+ "@changesets/cli": "^2.31.1",
97
+ "eslint": "^10.7.0",
98
+ "oxfmt": "^0.60.0",
99
+ "oxlint": "^1.75.0",
100
+ "oxlint-tsgolint": "^7.0.2001",
101
+ "storybook": "^10.5.3",
97
102
  "vitest": "^4.1.10"
98
103
  },
99
- "engines": {
100
- "node": "^20.19.0 || ^22.13.0 || >=24 || >=26"
104
+ "peerDependencies": {
105
+ "eslint": ">= 10.7.0",
106
+ "oxfmt": ">= 0.60.0",
107
+ "oxlint": ">= 1.75.0",
108
+ "oxlint-tsgolint": ">= 7.0.2001"
101
109
  },
102
- "keywords": [
103
- "oxlint",
104
- "oxlint-config",
105
- "linter",
106
- "typescript"
107
- ],
108
- "homepage": "https://github.com/wistia/oxlint-config#readme",
109
- "bugs": {
110
- "url": "https://github.com/wistia/oxlint-config/issues"
110
+ "peerDependenciesMeta": {
111
+ "oxfmt": {
112
+ "optional": true
113
+ }
111
114
  },
112
- "repository": {
113
- "type": "git",
114
- "url": "git+https://github.com/wistia/oxlint-config.git"
115
+ "engines": {
116
+ "node": "^20.19.0 || ^22.13.0 || >=24 || >=26"
115
117
  },
116
- "author": "Wistia Engineering",
117
- "license": "MIT"
118
+ "packageManager": "yarn@4.17.1"
118
119
  }
package/rules/node.mjs CHANGED
@@ -44,6 +44,10 @@ export const nodeRules = {
44
44
  // Decision: too restrictive for general use
45
45
  'node/no-sync': 'off',
46
46
 
47
+ // Disallow top-level await
48
+ // https://oxc.rs/docs/guide/usage/linter/rules/node/no-top-level-await.html
49
+ 'node/no-top-level-await': ['error', { ignoreBin: true }],
50
+
47
51
  //eslint-plugin-n rules via jsPlugins
48
52
 
49
53
  // Disallow deprecated APIs
@@ -80,7 +84,8 @@ export const nodeRules = {
80
84
 
81
85
  // Disallow top-level await
82
86
  // https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-top-level-await.md
83
- 'n/no-top-level-await': ['error', { ignoreBin: true }],
87
+ // Decision: handled by native node/no-top-level-await
88
+ 'n/no-top-level-await': 'off',
84
89
 
85
90
  // Require return statements after callbacks
86
91
  // https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/callback-return.md
package/rules/react.mjs CHANGED
@@ -249,6 +249,11 @@ export const reactRules = {
249
249
  // Decision: requires project-specific configuration
250
250
  'react/forbid-elements': 'off',
251
251
 
252
+ // Enforce a consistent function form for function components
253
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/function-component-definition.html
254
+ // Decision: style preference
255
+ 'react/function-component-definition': 'off',
256
+
252
257
  // Enforce destructuring assignment of useState hook
253
258
  // https://oxc.rs/docs/guide/usage/linter/rules/react/hook-use-state.html
254
259
  // Decision: too opinionated for general use
package/rules/vitest.mjs CHANGED
@@ -36,6 +36,10 @@ export const vitestRules = {
36
36
  // https://oxc.rs/docs/guide/usage/linter/rules/vitest/padding-around-after-all-blocks.html
37
37
  'vitest/padding-around-after-all-blocks': 'error',
38
38
 
39
+ // Enforce padding around test blocks
40
+ // https://oxc.rs/docs/guide/usage/linter/rules/vitest/padding-around-test-blocks.html
41
+ 'vitest/padding-around-test-blocks': 'error',
42
+
39
43
  // Disallow conditional tests
40
44
  // https://oxc.rs/docs/guide/usage/linter/rules/vitest/no-conditional-in-test.html
41
45
  'vitest/no-conditional-in-test': 'error',
@@ -509,7 +513,8 @@ export const vitestRules = {
509
513
 
510
514
  // Enforce padding around test blocks
511
515
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/padding-around-test-blocks.md
512
- 'vitest-js/padding-around-test-blocks': 'error',
516
+ // Decision: handled by native vitest/padding-around-test-blocks
517
+ 'vitest-js/padding-around-test-blocks': 'off',
513
518
 
514
519
  // Prefer toHaveBeenCalledOnce() over toHaveBeenCalledTimes(1)
515
520
  // https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-once.md