@wistia/oxlint-config 1.3.0 → 1.5.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 +3 -3
- package/rules/base.mjs +1 -1
- package/rules/import.mjs +2 -7
- package/rules/unicorn.mjs +8 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wistia/oxlint-config",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "Wistia's Oxlint configurations",
|
|
5
5
|
"packageManager": "yarn@4.17.0",
|
|
6
6
|
"type": "module",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"eslint": ">= 10.5.0",
|
|
57
|
-
"oxlint": ">= 1.
|
|
57
|
+
"oxlint": ">= 1.71.0",
|
|
58
58
|
"oxlint-tsgolint": ">= 0.23.0"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"@changesets/cli": "^2.31.0",
|
|
79
79
|
"eslint": "^10.5.0",
|
|
80
80
|
"oxfmt": "^0.55.0",
|
|
81
|
-
"oxlint": "^1.
|
|
81
|
+
"oxlint": "^1.71.0",
|
|
82
82
|
"oxlint-tsgolint": "^0.23.0",
|
|
83
83
|
"storybook": "^10.4.5",
|
|
84
84
|
"vitest": "^4.1.9"
|
package/rules/base.mjs
CHANGED
|
@@ -818,7 +818,7 @@ export const baseRules = {
|
|
|
818
818
|
|
|
819
819
|
// Enforce sorted import declarations within modules
|
|
820
820
|
// https://oxc.rs/docs/guide/usage/linter/rules/eslint/sort-imports.html
|
|
821
|
-
// Decision: handled by import
|
|
821
|
+
// Decision: handled by oxfmt's import sorting
|
|
822
822
|
'eslint/sort-imports': 'off',
|
|
823
823
|
|
|
824
824
|
// Require object keys to be sorted
|
package/rules/import.mjs
CHANGED
|
@@ -192,13 +192,8 @@ export const importRules = {
|
|
|
192
192
|
|
|
193
193
|
// Ensure absolute imports are above relative imports
|
|
194
194
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/order.md
|
|
195
|
-
'import
|
|
196
|
-
|
|
197
|
-
{
|
|
198
|
-
groups: ['type', ['builtin', 'external', 'internal'], 'index', ['parent', 'sibling']],
|
|
199
|
-
'newlines-between': 'never',
|
|
200
|
-
},
|
|
201
|
-
],
|
|
195
|
+
// Decision: handled by oxfmt's import sorting (https://oxc.rs/docs/guide/usage/formatter/sorting.html)
|
|
196
|
+
'import-x-js/order': 'off',
|
|
202
197
|
|
|
203
198
|
// Require a newline after the last import/require in a group
|
|
204
199
|
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/newline-after-import.md
|
package/rules/unicorn.mjs
CHANGED
|
@@ -74,6 +74,10 @@ export const unicornRules = {
|
|
|
74
74
|
},
|
|
75
75
|
],
|
|
76
76
|
|
|
77
|
+
// Limit the depth of nested calls
|
|
78
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/unicorn/max-nested-calls.html
|
|
79
|
+
'unicorn/max-nested-calls': ['error', { max: 3 }],
|
|
80
|
+
|
|
77
81
|
// Require `new` when creating an object using a built-in constructor
|
|
78
82
|
// https://oxc.rs/docs/guide/usage/linter/rules/unicorn/new-for-builtins.html
|
|
79
83
|
'unicorn/new-for-builtins': 'error',
|
|
@@ -457,6 +461,10 @@ export const unicornRules = {
|
|
|
457
461
|
// https://oxc.rs/docs/guide/usage/linter/rules/unicorn/prefer-node-protocol.html
|
|
458
462
|
'unicorn/prefer-node-protocol': 'error',
|
|
459
463
|
|
|
464
|
+
// Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`
|
|
465
|
+
// https://oxc.rs/docs/guide/usage/linter/rules/unicorn/prefer-number-coercion.html
|
|
466
|
+
'unicorn/prefer-number-coercion': 'error',
|
|
467
|
+
|
|
460
468
|
// Prefer `Number.parseInt()` / `Number.parseFloat()` / `Number.isNaN()` over their global counterparts
|
|
461
469
|
// https://oxc.rs/docs/guide/usage/linter/rules/unicorn/prefer-number-properties.html
|
|
462
470
|
'unicorn/prefer-number-properties': 'error',
|