@wistia/oxlint-config 1.4.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/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/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',
|