@wistia/oxlint-config 1.0.4 → 1.1.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 +12 -12
- package/rules/base.mjs +2 -2
- package/rules/react.mjs +9 -0
- package/rules/unicorn.mjs +12 -0
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wistia/oxlint-config",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Wistia's Oxlint configurations",
|
|
5
|
-
"packageManager": "yarn@4.
|
|
5
|
+
"packageManager": "yarn@4.17.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
|
8
8
|
"configs",
|
|
@@ -51,13 +51,13 @@
|
|
|
51
51
|
"validate": "vitest run test/validate-configs.test.mjs"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"eslint": ">= 10.
|
|
55
|
-
"oxlint": ">= 1.
|
|
54
|
+
"eslint": ">= 10.5.0",
|
|
55
|
+
"oxlint": ">= 1.70.0",
|
|
56
56
|
"oxlint-tsgolint": ">= 0.23.0"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@eslint-react/eslint-plugin": "^5.
|
|
60
|
-
"@vitest/eslint-plugin": "^1.6.
|
|
59
|
+
"@eslint-react/eslint-plugin": "^5.9.0",
|
|
60
|
+
"@vitest/eslint-plugin": "^1.6.20",
|
|
61
61
|
"confusing-browser-globals": "^1.0.11",
|
|
62
62
|
"eslint-plugin-barrel-files": "^3.0.1",
|
|
63
63
|
"eslint-plugin-import-x": "^4.16.2",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"eslint-plugin-n": "^18.1.0",
|
|
66
66
|
"eslint-plugin-no-only-tests": "^3.4.0",
|
|
67
67
|
"eslint-plugin-playwright": "^2.10.4",
|
|
68
|
-
"eslint-plugin-storybook": "^10.4.
|
|
68
|
+
"eslint-plugin-storybook": "^10.4.5",
|
|
69
69
|
"eslint-plugin-styled-components": "^0.0.0",
|
|
70
70
|
"eslint-plugin-styled-components-a11y": "^2.2.1",
|
|
71
71
|
"eslint-plugin-testing-library": "^7.16.2",
|
|
@@ -74,12 +74,12 @@
|
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@changesets/changelog-github": "^0.7.0",
|
|
76
76
|
"@changesets/cli": "^2.31.0",
|
|
77
|
-
"eslint": "^10.
|
|
78
|
-
"oxfmt": "^0.
|
|
79
|
-
"oxlint": "^1.
|
|
77
|
+
"eslint": "^10.5.0",
|
|
78
|
+
"oxfmt": "^0.55.0",
|
|
79
|
+
"oxlint": "^1.70.0",
|
|
80
80
|
"oxlint-tsgolint": "^0.23.0",
|
|
81
|
-
"storybook": "^10.4.
|
|
82
|
-
"vitest": "^4.1.
|
|
81
|
+
"storybook": "^10.4.5",
|
|
82
|
+
"vitest": "^4.1.9"
|
|
83
83
|
},
|
|
84
84
|
"engines": {
|
|
85
85
|
"node": "^20.19.0 || ^22.13.0 || >=24 || >=26"
|
package/rules/base.mjs
CHANGED
|
@@ -684,8 +684,8 @@ export const baseRules = {
|
|
|
684
684
|
|
|
685
685
|
// Require following curly brace conventions
|
|
686
686
|
// https://oxc.rs/docs/guide/usage/linter/rules/eslint/curly.html
|
|
687
|
-
// Decision:
|
|
688
|
-
'eslint/curly': '
|
|
687
|
+
// Decision: enforce curly braces for all control statements because even the `multiline` option can allow subtle bugs
|
|
688
|
+
'eslint/curly': ['error', 'all'],
|
|
689
689
|
|
|
690
690
|
// Require function names to match the name of the variable or property to which they are assigned
|
|
691
691
|
// https://oxc.rs/docs/guide/usage/linter/rules/eslint/func-name-matching.html
|
package/rules/react.mjs
CHANGED
|
@@ -272,6 +272,15 @@ export const reactRules = {
|
|
|
272
272
|
// Decision: too opinionated for general use
|
|
273
273
|
'react/state-in-constructor': 'off',
|
|
274
274
|
|
|
275
|
+
// Surface code that violates the Rules of React the compiler relies on
|
|
276
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/react/react-compiler.html
|
|
277
|
+
'react/react-compiler': 'error',
|
|
278
|
+
|
|
279
|
+
// Disallow string literals in JSX
|
|
280
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/react/jsx-no-literals.html
|
|
281
|
+
// Decision: stylistic/i18n rule, too strict for general use
|
|
282
|
+
'react/jsx-no-literals': 'off',
|
|
283
|
+
|
|
275
284
|
//rules via jsPlugins (@eslint-react/eslint-plugin)
|
|
276
285
|
|
|
277
286
|
// Validates usage of Error Boundaries instead of try/catch for child errors
|
package/rules/unicorn.mjs
CHANGED
|
@@ -95,6 +95,10 @@ export const unicornRules = {
|
|
|
95
95
|
// https://oxc.rs/docs/guide/usage/linter/rules/unicorn/no-array-callback-reference.html
|
|
96
96
|
'unicorn/no-array-callback-reference': 'error',
|
|
97
97
|
|
|
98
|
+
// Disallow `Array#fill()` with a reference type, which shares one reference across all slots
|
|
99
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/unicorn/no-array-fill-with-reference-type.html
|
|
100
|
+
'unicorn/no-array-fill-with-reference-type': 'error',
|
|
101
|
+
|
|
98
102
|
// Prefer `for...of` over `Array#forEach`
|
|
99
103
|
// https://oxc.rs/docs/guide/usage/linter/rules/unicorn/no-array-for-each.html
|
|
100
104
|
// Decision: `Array#forEach` is a legitimate iteration pattern
|
|
@@ -395,6 +399,10 @@ export const unicornRules = {
|
|
|
395
399
|
// Decision: EventTarget vs EventEmitter is architectural; let consumers choose
|
|
396
400
|
'unicorn/prefer-event-target': 'off',
|
|
397
401
|
|
|
402
|
+
// Prefer `export ... from` over importing then exporting in two steps
|
|
403
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/unicorn/prefer-export-from.html
|
|
404
|
+
'unicorn/prefer-export-from': 'error',
|
|
405
|
+
|
|
398
406
|
// Prefer `globalThis` over `window` / `self` / `global`
|
|
399
407
|
// https://oxc.rs/docs/guide/usage/linter/rules/unicorn/prefer-global-this.html
|
|
400
408
|
// Decision: we should consider enabling this in the future but it will involve a lot of refactoring
|
|
@@ -490,6 +498,10 @@ export const unicornRules = {
|
|
|
490
498
|
// https://oxc.rs/docs/guide/usage/linter/rules/unicorn/prefer-set-size.html
|
|
491
499
|
'unicorn/prefer-set-size': 'error',
|
|
492
500
|
|
|
501
|
+
// Prefer a single call over consecutive identical method calls (e.g. repeated `Array#push`)
|
|
502
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/unicorn/prefer-single-call.html
|
|
503
|
+
'unicorn/prefer-single-call': 'error',
|
|
504
|
+
|
|
493
505
|
// Prefer the spread operator over `Array.from(…)` etc.
|
|
494
506
|
// https://oxc.rs/docs/guide/usage/linter/rules/unicorn/prefer-spread.html
|
|
495
507
|
'unicorn/prefer-spread': 'error',
|