@zhangyu1818/oxlint-config 2.2.0 → 2.4.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/dist/index.js +9 -0
- package/package.json +12 -12
package/dist/index.js
CHANGED
|
@@ -40,6 +40,7 @@ const defaultIgnorePatterns = [
|
|
|
40
40
|
//#region src/oxlint/presets/imports.ts
|
|
41
41
|
const importRules = {
|
|
42
42
|
"import/first": "error",
|
|
43
|
+
"import/newline-after-import": "error",
|
|
43
44
|
"import/no-duplicates": ["error", { "prefer-inline": true }],
|
|
44
45
|
"import/no-mutable-exports": "error",
|
|
45
46
|
"import/no-named-default": "error",
|
|
@@ -159,6 +160,7 @@ const javascriptRules = {
|
|
|
159
160
|
"no-useless-return": "error",
|
|
160
161
|
"no-var": "error",
|
|
161
162
|
"no-with": "error",
|
|
163
|
+
"one-var": ["error", { initialized: "never" }],
|
|
162
164
|
"object-shorthand": [
|
|
163
165
|
"error",
|
|
164
166
|
"always",
|
|
@@ -282,6 +284,10 @@ const jsxA11yRules = {
|
|
|
282
284
|
};
|
|
283
285
|
const baseReactRules = {
|
|
284
286
|
"react/exhaustive-deps": "warn",
|
|
287
|
+
"react/function-component-definition": ["error", {
|
|
288
|
+
namedComponents: ["arrow-function", "function-declaration"],
|
|
289
|
+
unnamedComponents: "arrow-function"
|
|
290
|
+
}],
|
|
285
291
|
"react/jsx-boolean-value": "error",
|
|
286
292
|
"react/jsx-curly-brace-presence": ["error", {
|
|
287
293
|
children: "never",
|
|
@@ -304,6 +310,7 @@ const baseReactRules = {
|
|
|
304
310
|
"react/no-string-refs": "error",
|
|
305
311
|
"react/no-unknown-property": "error",
|
|
306
312
|
"react/no-unescaped-entities": "error",
|
|
313
|
+
"react/no-unstable-nested-components": "error",
|
|
307
314
|
"react/react-in-jsx-scope": "off",
|
|
308
315
|
"react/require-render-return": "error",
|
|
309
316
|
"react/rules-of-hooks": "error",
|
|
@@ -437,10 +444,12 @@ const unicornRules = {
|
|
|
437
444
|
"unicorn/error-message": "error",
|
|
438
445
|
"unicorn/escape-case": "error",
|
|
439
446
|
"unicorn/explicit-length-check": ["error", { "non-zero": "not-equal" }],
|
|
447
|
+
"unicorn/explicit-timer-delay": "error",
|
|
440
448
|
"unicorn/new-for-builtins": "error",
|
|
441
449
|
"unicorn/no-anonymous-default-export": "error",
|
|
442
450
|
"unicorn/no-await-expression-member": "error",
|
|
443
451
|
"unicorn/no-await-in-promise-methods": "error",
|
|
452
|
+
"unicorn/no-confusing-array-with": "error",
|
|
444
453
|
"unicorn/no-instanceof-builtins": "error",
|
|
445
454
|
"unicorn/no-new-array": "error",
|
|
446
455
|
"unicorn/no-new-buffer": "error",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhangyu1818/oxlint-config",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"description": "Native Oxlint and Oxfmt config preset package",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"oxc",
|
|
@@ -40,21 +40,21 @@
|
|
|
40
40
|
"local-pkg": "^1.2.1"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@types/node": "^
|
|
44
|
-
"oxfmt": "^0.
|
|
45
|
-
"oxlint": "^1.
|
|
46
|
-
"oxlint-tsgolint": "^0.
|
|
47
|
-
"tsdown": "^0.22.
|
|
48
|
-
"typescript": "^
|
|
49
|
-
"vitest": "^4.1.
|
|
43
|
+
"@types/node": "^26.2.0",
|
|
44
|
+
"oxfmt": "^0.63.0",
|
|
45
|
+
"oxlint": "^1.78.0",
|
|
46
|
+
"oxlint-tsgolint": "^7.0.2001",
|
|
47
|
+
"tsdown": "^0.22.14",
|
|
48
|
+
"typescript": "^7.0.2",
|
|
49
|
+
"vitest": "^4.1.10"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"oxfmt": "^0.
|
|
53
|
-
"oxlint": "^1.
|
|
54
|
-
"oxlint-tsgolint": "^0.
|
|
52
|
+
"oxfmt": "^0.63.0",
|
|
53
|
+
"oxlint": "^1.78.0",
|
|
54
|
+
"oxlint-tsgolint": "^7.0.2001"
|
|
55
55
|
},
|
|
56
56
|
"engines": {
|
|
57
57
|
"node": ">=24"
|
|
58
58
|
},
|
|
59
|
-
"packageManager": "pnpm@11.
|
|
59
|
+
"packageManager": "pnpm@11.21.0"
|
|
60
60
|
}
|