Skip to content

Commit 4005f5d

Browse files
committed
ci: use eslint-import-resolver-oxc as import-x resolver
1 parent 7e12471 commit 4005f5d

File tree

3 files changed

+165
-4
lines changed

3 files changed

+165
-4
lines changed

eslint.config.mts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import tseslint from "typescript-eslint";
1616
type FlatConfig = Parameters<typeof tseslint.config>[number];
1717
const dirname = url.fileURLToPath(new URL(".", import.meta.url));
1818
const config: FlatConfig[] = [
19-
// register all of the plugins up-front
2019
gitignore(),
2120
{
2221
ignores: [
@@ -28,6 +27,7 @@ const config: FlatConfig[] = [
2827
],
2928
},
3029
{
30+
// register all of the plugins up-front
3131
// note - intentionally uses computed syntax to make it easy to sort the keys
3232
plugins: {
3333
["@typescript-eslint"]: tseslint.plugin,
@@ -39,6 +39,12 @@ const config: FlatConfig[] = [
3939
["simple-import-sort"]: simpleImportSortPlugin,
4040
["unicorn"]: unicornPlugin,
4141
},
42+
settings: {
43+
"import-x/parsers": {
44+
"@typescript-eslint/parser": [".ts", ".tsx", ".cts", ".mts"],
45+
},
46+
"import-x/resolver": "oxc",
47+
},
4248
},
4349
// extends ...
4450
eslint.configs.recommended,
@@ -130,15 +136,13 @@ const config: FlatConfig[] = [
130136
"import-x/consistent-type-specifier-style": "warn",
131137
"import-x/export": "error",
132138
"import-x/first": "warn",
133-
"import-x/named": "off",
134139
"import-x/newline-after-import": "warn",
135140
"import-x/no-absolute-path": "error",
136-
"import-x/no-cycle": "off",
137141
"import-x/no-duplicates": "error",
138142
"import-x/no-dynamic-require": "error",
139143
"import-x/no-empty-named-blocks": "error",
140144
"import-x/no-mutable-exports": "error",
141-
"import-x/no-self-import": "off",
145+
"import-x/no-self-import": "error",
142146
"import-x/no-unused-modules": "error",
143147
// Part: simple-import-sort rules
144148
"simple-import-sort/exports": "warn",

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
"esbuild": "0.23.0",
7373
"eslint": "^9.6.0",
7474
"eslint-config-flat-gitignore": "0.1.6",
75+
"eslint-import-resolver-oxc": "^0.1.5",
7576
"eslint-plugin-eslint-comments": "3.2.0",
7677
"eslint-plugin-eslint-plugin": "6.2.0",
7778
"eslint-plugin-functional": "6.6.1",

pnpm-lock.yaml

Lines changed: 156 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)