@wistia/oxlint-config 1.9.1 → 1.10.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.9.1",
3
+ "version": "1.10.1",
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.11.3",
80
- "@vitest/eslint-plugin": "^1.6.21",
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",
85
- "eslint-plugin-n": "^18.2.1",
84
+ "eslint-plugin-jest-dom": "^5.6.0",
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.4.6",
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",
@@ -93,19 +93,19 @@
93
93
  },
94
94
  "devDependencies": {
95
95
  "@changesets/changelog-github": "^0.7.0",
96
- "@changesets/cli": "^2.31.0",
97
- "eslint": "^10.6.0",
98
- "oxfmt": "^0.59.0",
99
- "oxlint": "^1.74.0",
100
- "oxlint-tsgolint": "^0.24.0",
101
- "storybook": "^10.4.6",
96
+ "@changesets/cli": "^2.31.1",
97
+ "eslint": "^10.8.0",
98
+ "oxfmt": "^0.60.0",
99
+ "oxlint": "^1.75.0",
100
+ "oxlint-tsgolint": "^7.0.2001",
101
+ "storybook": "^10.5.5",
102
102
  "vitest": "^4.1.10"
103
103
  },
104
104
  "peerDependencies": {
105
- "eslint": ">= 10.6.0",
106
- "oxfmt": ">= 0.59.0",
107
- "oxlint": ">= 1.74.0",
108
- "oxlint-tsgolint": ">= 0.24.0"
105
+ "eslint": ">= 10.8.0",
106
+ "oxfmt": ">= 0.60.0",
107
+ "oxlint": ">= 1.75.0",
108
+ "oxlint-tsgolint": ">= 7.0.2001"
109
109
  },
110
110
  "peerDependenciesMeta": {
111
111
  "oxfmt": {
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
@@ -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/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/unicorn.mjs CHANGED
@@ -65,15 +65,21 @@ 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
+ // 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.
74
+ // - `chalk` ships default-only, which is right for the pre-built instance
75
+ // (chalk's whole main API) but wrong for `import { Chalk } from 'chalk'`,
76
+ // the class you instantiate for a custom instance. Both are legitimate.
70
77
  'unicorn/import-style': [
71
78
  'error',
72
79
  {
73
80
  styles: {
74
81
  'node:path': { named: true, default: false },
75
- path: { named: true, default: false },
76
- chalk: { named: true, default: false },
82
+ chalk: { named: true, default: true },
77
83
  },
78
84
  },
79
85
  ],
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