Skip to content

Commit 5c082fe

Browse files
authored
chore: improve oxc (#2572)
1 parent 867d111 commit 5c082fe

File tree

417 files changed

+2075
-1484
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

417 files changed

+2075
-1484
lines changed

.oxfmtrc.json

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,15 @@
2121
"*.toml",
2222
"CHANGELOG.md"
2323
],
24-
// "experimentalSortImports": {
25-
// "groups": [["builtin"], ["external"], ["parent", "sibling", "index", "object"], ["type"]],
26-
// "newlinesBetween": false,
27-
// },
24+
"experimentalSortImports": {
25+
"groups": [
26+
["side_effect"],
27+
["builtin", "external"],
28+
["index", "sibling", "parent"],
29+
["unknown"]
30+
],
31+
"newlinesBetween": true,
32+
"ignoreCase": true
33+
},
2834
"trailingComma": "es5"
2935
}

.oxlintrc.json

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,15 @@
88
"builtin": true,
99
"es2026": true
1010
},
11-
"ignorePatterns": ["**/__tests__/**", "packages/*/lib/**", "*.js", "*.cjs"],
11+
"ignorePatterns": ["packages/*/lib/**", "*.js", "*.cjs"],
1212
"rules": {
13+
"eslint/no-array-constructor": "error",
1314
"eslint/no-case-declarations": "error",
1415
"eslint/no-empty": "error",
1516
"eslint/no-redeclare": "error",
1617
"eslint/no-regex-spaces": "error",
1718
"eslint/no-unexpected-multiline": "error",
1819
"eslint/no-unreachable": "error",
19-
"eslint/no-array-constructor": "error",
20-
2120
"eslint/no-unused-vars": [
2221
"error",
2322
{
@@ -27,17 +26,38 @@
2726
}
2827
],
2928

30-
"typescript/consistent-type-imports": ["error", { "prefer": "type-imports" }],
31-
3229
"typescript/ban-ts-comment": "error",
3330
"typescript/no-empty-object-type": "error",
31+
"typescript/no-explicit-any": "warn",
3432
"typescript/no-namespace": "error",
3533
"typescript/no-require-imports": "error",
3634
"typescript/no-unnecessary-type-constraint": "error",
3735
"typescript/no-unsafe-function-type": "error",
36+
"typescript/consistent-type-imports": [
37+
"warn",
38+
{
39+
"prefer": "type-imports",
40+
"fixStyle": "inline-type-imports"
41+
}
42+
],
3843

39-
"typescript/no-explicit-any": "warn",
40-
41-
"import/no-duplicates": "error"
42-
}
44+
"import/no-cycle": ["warn"],
45+
"import/no-duplicates": [
46+
"warn",
47+
{
48+
"preferInline": true
49+
}
50+
]
51+
},
52+
"overrides": [
53+
{
54+
"files": ["**/__tests__/**"],
55+
"plugins": ["vitest"],
56+
"rules": {
57+
"typescript/no-explicit-any": "allow",
58+
"typescript/ban-ts-comment": "allow",
59+
"eslint/no-control-regex": "allow"
60+
}
61+
}
62+
]
4363
}

0 commit comments

Comments
 (0)