feat: cspell sort

This commit is contained in:
xingyu4j
2025-12-03 15:37:04 +08:00
parent 0032c608f1
commit 49db40d557
3 changed files with 32 additions and 18 deletions

13
.vscode/settings.json vendored
View File

@@ -226,16 +226,5 @@
"commentTranslate.multiLineMerge": true, "commentTranslate.multiLineMerge": true,
"vue.server.hybridMode": true, "vue.server.hybridMode": true,
"typescript.tsdk": "node_modules/typescript/lib", "typescript.tsdk": "node_modules/typescript/lib",
"oxc.enable": false, "oxc.enable": false
"cSpell.words": [
"archiver",
"axios",
"dotenv",
"isequal",
"jspm",
"napi",
"nolebase",
"rollup",
"vitest"
]
} }

View File

@@ -7,11 +7,14 @@
"acmr", "acmr",
"antd", "antd",
"antdv", "antdv",
"archiver",
"astro", "astro",
"axios",
"brotli", "brotli",
"clsx", "clsx",
"defu", "defu",
"demi", "demi",
"dotenv",
"echarts", "echarts",
"ependencies", "ependencies",
"esno", "esno",
@@ -20,6 +23,8 @@
"iconify", "iconify",
"iconoir", "iconoir",
"intlify", "intlify",
"isequal",
"jspm",
"lockb", "lockb",
"lucide", "lucide",
"minh", "minh",
@@ -27,7 +32,9 @@
"mkdist", "mkdist",
"mockjs", "mockjs",
"naiveui", "naiveui",
"napi",
"nocheck", "nocheck",
"nolebase",
"noopener", "noopener",
"noreferrer", "noreferrer",
"nprogress", "nprogress",
@@ -37,6 +44,7 @@
"publint", "publint",
"qrcode", "qrcode",
"reka", "reka",
"rollup",
"shadcn", "shadcn",
"sonner", "sonner",
"sortablejs", "sortablejs",
@@ -52,19 +60,20 @@
"vite", "vite",
"vitejs", "vitejs",
"vitepress", "vitepress",
"vitest",
"vnode", "vnode",
"vueuse", "vueuse",
"yxxx" "yxxx"
], ],
"ignorePaths": [ "ignorePaths": [
"**/node_modules/**",
"**/dist/**",
"**/*-dist/**", "**/*-dist/**",
"**/icons/**",
"pnpm-lock.yaml",
"**/*.log", "**/*.log",
"**/*.test.ts",
"**/*.spec.ts", "**/*.spec.ts",
"**/__tests__/**" "**/*.test.ts",
"**/__tests__/**",
"**/dist/**",
"**/icons/**",
"**/node_modules/**",
"pnpm-lock.yaml"
] ]
} }

View File

@@ -48,6 +48,7 @@ export async function jsonc(): Promise<Linter.Config[]> {
}, },
sortTsconfig(), sortTsconfig(),
sortPackageJson(), sortPackageJson(),
sortCspellJson(),
]; ];
} }
@@ -130,6 +131,21 @@ function sortPackageJson(): Linter.Config {
}; };
} }
function sortCspellJson(): Linter.Config {
return {
files: ['**/cspell.json', '**/.cspell.json'],
rules: {
'jsonc/sort-array-values': [
'error',
{
order: { type: 'asc' },
pathPattern: '^words$|^ignorePaths$',
},
],
},
};
}
function sortTsconfig(): Linter.Config { function sortTsconfig(): Linter.Config {
return { return {
files: [ files: [