@wistia/oxlint-config 1.10.0 → 1.11.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": "1.10.0",
3
+ "version": "1.11.0",
4
4
  "description": "Wistia's Oxlint configurations",
5
5
  "keywords": [
6
6
  "linter",
@@ -76,16 +76,16 @@
76
76
  "validate": "vitest run test/validate-configs.test.mjs"
77
77
  },
78
78
  "dependencies": {
79
- "@eslint-react/eslint-plugin": "^5.17.3",
80
- "@vitest/eslint-plugin": "^1.6.23",
79
+ "@eslint-react/eslint-plugin": "^5.18.0",
80
+ "@vitest/eslint-plugin": "^1.6.24",
81
81
  "confusing-browser-globals": "^1.0.11",
82
82
  "eslint-plugin-barrel-files": "^3.0.1",
83
83
  "eslint-plugin-import-x": "^4.17.1",
84
- "eslint-plugin-jest-dom": "^5.5.0",
84
+ "eslint-plugin-jest-dom": "^5.6.0",
85
85
  "eslint-plugin-n": "^18.2.2",
86
86
  "eslint-plugin-no-only-tests": "^3.4.0",
87
- "eslint-plugin-playwright": "^2.10.5",
88
- "eslint-plugin-storybook": "^10.5.3",
87
+ "eslint-plugin-playwright": "^2.11.0",
88
+ "eslint-plugin-storybook": "^10.5.5",
89
89
  "eslint-plugin-styled-components": "^0.0.0",
90
90
  "eslint-plugin-styled-components-a11y": "^2.2.1",
91
91
  "eslint-plugin-testing-library": "^7.16.2",
@@ -94,17 +94,17 @@
94
94
  "devDependencies": {
95
95
  "@changesets/changelog-github": "^0.7.0",
96
96
  "@changesets/cli": "^2.31.1",
97
- "eslint": "^10.7.0",
98
- "oxfmt": "^0.60.0",
99
- "oxlint": "^1.75.0",
97
+ "eslint": "^10.8.0",
98
+ "oxfmt": "^0.61.0",
99
+ "oxlint": "^1.76.0",
100
100
  "oxlint-tsgolint": "^7.0.2001",
101
- "storybook": "^10.5.3",
101
+ "storybook": "^10.5.5",
102
102
  "vitest": "^4.1.10"
103
103
  },
104
104
  "peerDependencies": {
105
- "eslint": ">= 10.7.0",
106
- "oxfmt": ">= 0.60.0",
107
- "oxlint": ">= 1.75.0",
105
+ "eslint": ">= 10.8.0",
106
+ "oxfmt": ">= 0.61.0",
107
+ "oxlint": ">= 1.76.0",
108
108
  "oxlint-tsgolint": ">= 7.0.2001"
109
109
  },
110
110
  "peerDependenciesMeta": {
@@ -115,5 +115,5 @@
115
115
  "engines": {
116
116
  "node": "^20.19.0 || ^22.13.0 || >=24 || >=26"
117
117
  },
118
- "packageManager": "yarn@4.17.1"
118
+ "packageManager": "yarn@4.18.0"
119
119
  }
package/rules/base.mjs CHANGED
@@ -276,6 +276,11 @@ export const baseRules = {
276
276
  // https://oxc.rs/docs/guide/usage/linter/rules/eslint/grouped-accessor-pairs.html
277
277
  'eslint/grouped-accessor-pairs': 'error',
278
278
 
279
+ // Disallow specified identifiers
280
+ // https://oxc.rs/docs/guide/usage/linter/rules/eslint/id-denylist.html
281
+ // Decision: requires a project-specific identifier list; too opinionated for a shared config
282
+ 'eslint/id-denylist': 'off',
283
+
279
284
  // Require identifiers to match a specified regular expression
280
285
  // https://oxc.rs/docs/guide/usage/linter/rules/eslint/id-match.html
281
286
  // Decision: too opinionated for general use
@@ -857,6 +862,10 @@ export const baseRules = {
857
862
  // https://oxc.rs/docs/guide/usage/linter/rules/oxc/bad-object-literal-comparison.html
858
863
  'oxc/bad-object-literal-comparison': 'error',
859
864
 
865
+ // Disallow matchAll with regex missing the global flag (throws at runtime)
866
+ // https://oxc.rs/docs/guide/usage/linter/rules/oxc/bad-match-all-arg.html
867
+ 'oxc/bad-match-all-arg': 'error',
868
+
860
869
  // Disallow replaceAll with regex missing the global flag (throws at runtime)
861
870
  // https://oxc.rs/docs/guide/usage/linter/rules/oxc/bad-replace-all-arg.html
862
871
  'oxc/bad-replace-all-arg': 'error',
package/rules/node.mjs CHANGED
@@ -14,6 +14,10 @@ export const nodeRules = {
14
14
  // https://oxc.rs/docs/guide/usage/linter/rules/node/handle-callback-err.html
15
15
  'node/handle-callback-err': 'error',
16
16
 
17
+ // Enforce either module.exports or exports
18
+ // https://oxc.rs/docs/guide/usage/linter/rules/node/exports-style.html
19
+ 'node/exports-style': ['error', 'module.exports'],
20
+
17
21
  // Disallow the assignment to exports
18
22
  // https://oxc.rs/docs/guide/usage/linter/rules/node/no-exports-assign.html
19
23
  'node/no-exports-assign': 'error',
@@ -94,7 +98,8 @@ export const nodeRules = {
94
98
 
95
99
  // Enforce either module.exports or exports
96
100
  // https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/exports-style.md
97
- 'n/exports-style': 'error',
101
+ // Decision: handled by native node/exports-style
102
+ 'n/exports-style': 'off',
98
103
 
99
104
  // Require require() to be called in the top-level module scope
100
105
  // https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/global-require.md
@@ -196,6 +196,10 @@ export const playwrightRules = {
196
196
  // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-duplicate-slow.md
197
197
  'eslint-plugin-playwright/no-duplicate-slow': 'error',
198
198
 
199
+ // Disallow assertions on a Locator that can never fail
200
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-unnecessary-assertions.md
201
+ 'eslint-plugin-playwright/no-unnecessary-assertions': 'error',
202
+
199
203
  // Enforce blank lines between test blocks
200
204
  // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/consistent-spacing-between-blocks.md
201
205
  // Decision: style preference, left to a formatter
package/rules/unicorn.mjs CHANGED
@@ -65,15 +65,43 @@ export const unicornRules = {
65
65
 
66
66
  // Enforce specific import styles per module
67
67
  // https://oxc.rs/docs/guide/usage/linter/rules/unicorn/import-style.html
68
- // Override built-in defaults: this rule ships preferring default imports
69
- // for `chalk`, `path`, and `node:path`. We require named imports instead.
68
+ // Every option is set explicitly, including the four that match oxlint's
69
+ // default, so an upgrade cannot change consumer behavior without a diff
70
+ // here. `styles` is the complete set — nothing is inherited.
71
+ // - `node:path` and `node:util` are the only node builtins the rule
72
+ // constrains at all (default-only and named-only respectively); `fs`,
73
+ // `os`, `crypto`, `url`, `events` and the rest are unconstrained. Named
74
+ // is our style, so both are set to named. Bare `path` needs no entry —
75
+ // `unicorn/prefer-node-protocol` already rejects the non-prefixed form.
76
+ // - `chalk` ships default-only, which is right for the pre-built instance
77
+ // (chalk's whole main API) but wrong for `import { Chalk } from 'chalk'`,
78
+ // the class you instantiate for a custom instance. Both are legitimate.
70
79
  'unicorn/import-style': [
71
80
  'error',
72
81
  {
82
+ // Matches oxlint's default. Static imports are the primary surface.
83
+ checkImport: true,
84
+
85
+ // Matches oxlint's default. Covers `await import('node:path')`.
86
+ checkDynamicImport: true,
87
+
88
+ // Matches oxlint's default. Covers `require('node:path')` in CJS.
89
+ checkRequire: true,
90
+
91
+ // Decision: matches oxlint's default. The only form it adds is
92
+ // `export * from`, already an error via
93
+ // `barrel-files/avoid-re-export-all` — enabling it double-reports.
94
+ checkExportFrom: false,
95
+
96
+ // Differs from oxlint's default of `true`. Declaring the full style set
97
+ // instead of merging into the built-ins means an upgrade that adds or
98
+ // changes a built-in style cannot silently move consumer behavior.
99
+ extendDefaultStyles: false,
100
+
73
101
  styles: {
74
102
  'node:path': { named: true, default: false },
75
- path: { named: true, default: false },
76
- chalk: { named: true, default: false },
103
+ 'node:util': { named: true, default: false },
104
+ chalk: { named: true, default: true },
77
105
  },
78
106
  },
79
107
  ],