@wistia/oxlint-config 1.10.1 → 1.11.1

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.1",
3
+ "version": "1.11.1",
4
4
  "description": "Wistia's Oxlint configurations",
5
5
  "keywords": [
6
6
  "linter",
@@ -95,16 +95,16 @@
95
95
  "@changesets/changelog-github": "^0.7.0",
96
96
  "@changesets/cli": "^2.31.1",
97
97
  "eslint": "^10.8.0",
98
- "oxfmt": "^0.60.0",
99
- "oxlint": "^1.75.0",
98
+ "oxfmt": "^0.62.0",
99
+ "oxlint": "^1.77.0",
100
100
  "oxlint-tsgolint": "^7.0.2001",
101
101
  "storybook": "^10.5.5",
102
102
  "vitest": "^4.1.10"
103
103
  },
104
104
  "peerDependencies": {
105
105
  "eslint": ">= 10.8.0",
106
- "oxfmt": ">= 0.60.0",
107
- "oxlint": ">= 1.75.0",
106
+ "oxfmt": ">= 0.62.0",
107
+ "oxlint": ">= 1.77.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
package/rules/unicorn.mjs CHANGED
@@ -65,20 +65,42 @@ 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. Entries merge into the built-in style per key
69
- // rather than replacing it, so every key we want must be set explicitly.
70
- // - `node:path` ships default-only. Of all node builtins the rule constrains
71
- // only `node:path` (default-only) and `node:util` (named-only); `fs`,
72
- // `os`, `crypto`, `url`, `events` and the rest are unconstrained. Named is
73
- // our style everywhere else, so override it.
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.
74
76
  // - `chalk` ships default-only, which is right for the pre-built instance
75
77
  // (chalk's whole main API) but wrong for `import { Chalk } from 'chalk'`,
76
78
  // the class you instantiate for a custom instance. Both are legitimate.
77
79
  'unicorn/import-style': [
78
80
  'error',
79
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
+
80
101
  styles: {
81
102
  'node:path': { named: true, default: false },
103
+ 'node:util': { named: true, default: false },
82
104
  chalk: { named: true, default: true },
83
105
  },
84
106
  },