Skip to content

Commit 1b7ad7c

Browse files
committed
Bring back eslint-plugin-import
1 parent 1666e2b commit 1b7ad7c

21 files changed

+910
-34
lines changed

eslint.config.mjs

+15
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
import globals from "globals";
22
import js from "@eslint/js";
33
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
4+
import importPlugin from "eslint-plugin-import";
45

56
export default [
67
js.configs.recommended,
78
eslintPluginPrettierRecommended,
9+
importPlugin.flatConfigs.recommended,
810

911
// Ignore machine-generated files
1012
{
@@ -37,6 +39,19 @@ export default [
3739
"no-mixed-spaces-and-tabs": ["error", "smart-tabs"],
3840
"no-unused-vars": ["off"],
3941
complexity: ["warn", 16],
42+
43+
// eslint-import rules
44+
"import/no-unresolved": "off", // ESLint does not support subpath exports, but we do
45+
"import/no-extraneous-dependencies": "error",
46+
"import/newline-after-import": ["error", { count: 1 }],
47+
"import/order": [
48+
"error",
49+
{
50+
groups: ["builtin", "external", "internal", "parent", "sibling", "index"],
51+
"newlines-between": "always",
52+
alphabetize: { order: "asc", caseInsensitive: true },
53+
},
54+
],
4055
},
4156
},
4257
];

0 commit comments

Comments
 (0)