🔧 更新 Eslint 配置,暂时禁用 import/order 规则

This commit is contained in:
BTMuli
2026-04-01 22:45:15 +08:00
parent 234c13ee11
commit 7cb8a17a5b

View File

@@ -1,6 +1,6 @@
/**
* Vue & Typescript 文件的 Eslint 配置
* @since Beta v0.9.1
* @since Beta v0.9.9
*/
import pluginImport from "eslint-plugin-import";
import pluginPrettier from "eslint-plugin-prettier";
@@ -19,14 +19,15 @@ const tsConfigRules = {
"@typescript-eslint/no-unused-expressions": ["error", { allowShortCircuit: false }],
"@typescript-eslint/array-type": ["error", { default: "generic" }],
"@typescript-eslint/consistent-type-definitions": ["error", "type"],
"import/order": [
"error",
{
groups: ["builtin", "external", "internal", "parent", "sibling", "index", "unknown"],
"newlines-between": "always",
alphabetize: { order: "asc", caseInsensitive: true },
},
],
// TODO: 等后续 eslint-plugin-import 适配 ESLint 10 后再启用
// "import/order": [
// "error",
// {
// groups: ["builtin", "external", "internal", "parent", "sibling", "index", "unknown"],
// "newlines-between": "always",
// alphabetize: { order: "asc", caseInsensitive: true },
// },
// ],
"prettier/prettier": "error",
};