@wistia/oxlint-config 1.9.1 → 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/package.json +15 -15
- package/rules/node.mjs +6 -1
- package/rules/react.mjs +5 -0
- package/rules/vitest.mjs +6 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wistia/oxlint-config",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.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.
|
|
80
|
-
"@vitest/eslint-plugin": "^1.6.
|
|
79
|
+
"@eslint-react/eslint-plugin": "^5.17.3",
|
|
80
|
+
"@vitest/eslint-plugin": "^1.6.23",
|
|
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
84
|
"eslint-plugin-jest-dom": "^5.5.0",
|
|
85
|
-
"eslint-plugin-n": "^18.2.
|
|
85
|
+
"eslint-plugin-n": "^18.2.2",
|
|
86
86
|
"eslint-plugin-no-only-tests": "^3.4.0",
|
|
87
87
|
"eslint-plugin-playwright": "^2.10.5",
|
|
88
|
-
"eslint-plugin-storybook": "^10.
|
|
88
|
+
"eslint-plugin-storybook": "^10.5.3",
|
|
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.
|
|
97
|
-
"eslint": "^10.
|
|
98
|
-
"oxfmt": "^0.
|
|
99
|
-
"oxlint": "^1.
|
|
100
|
-
"oxlint-tsgolint": "^0.
|
|
101
|
-
"storybook": "^10.
|
|
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",
|
|
102
102
|
"vitest": "^4.1.10"
|
|
103
103
|
},
|
|
104
104
|
"peerDependencies": {
|
|
105
|
-
"eslint": ">= 10.
|
|
106
|
-
"oxfmt": ">= 0.
|
|
107
|
-
"oxlint": ">= 1.
|
|
108
|
-
"oxlint-tsgolint": ">= 0.
|
|
105
|
+
"eslint": ">= 10.7.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
|
-
|
|
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
|
-
|
|
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
|