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

View File

@@ -48,6 +48,7 @@ export async function jsonc(): Promise<Linter.Config[]> {
},
sortTsconfig(),
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 {
return {
files: [