refactor: 重新组织 ESLint 插件配置,添加区域注释以提高可读性
This commit is contained in:
@ -53,6 +53,7 @@ export default defineConfigWithVueTs(
|
||||
...oxlint.configs['flat/recommended'],
|
||||
skipFormatting,
|
||||
|
||||
// region >> eslint-plugin-unicorn >>
|
||||
eslintPluginUnicorn.configs.recommended,
|
||||
{
|
||||
rules: {
|
||||
@ -63,7 +64,9 @@ export default defineConfigWithVueTs(
|
||||
'unicorn/prevent-abbreviations': 'off',
|
||||
},
|
||||
},
|
||||
// endregion <<< eslint-plugin-unicorn <<<
|
||||
|
||||
// region >>> eslint-plugin-import-x >>>
|
||||
eslintPluginImportX.flatConfigs.recommended,
|
||||
{
|
||||
rules: {
|
||||
@ -72,6 +75,19 @@ export default defineConfigWithVueTs(
|
||||
'import-x/first': 'error',
|
||||
},
|
||||
},
|
||||
// endregion <<< eslint-plugin-import-x <<<
|
||||
|
||||
// region >>> eslint-plugin-perfectionist >>>
|
||||
// https://perfectionist.dev/guide/getting-started
|
||||
perfectionist.configs['recommended-natural'],
|
||||
{
|
||||
rules: {
|
||||
'perfectionist/sort-classes': 'off',
|
||||
'perfectionist/sort-objects': 'off',
|
||||
'perfectionist/sort-imports': ['error'],
|
||||
},
|
||||
},
|
||||
// endregion <<< eslint-plugin-perfectionist <<<
|
||||
|
||||
{
|
||||
rules: {
|
||||
@ -91,16 +107,4 @@ export default defineConfigWithVueTs(
|
||||
'vue/multi-word-component-names': 'off',
|
||||
},
|
||||
},
|
||||
|
||||
// https://perfectionist.dev/guide/getting-started
|
||||
[
|
||||
perfectionist.configs['recommended-natural'],
|
||||
{
|
||||
rules: {
|
||||
'perfectionist/sort-classes': 'off',
|
||||
'perfectionist/sort-objects': 'off',
|
||||
'perfectionist/sort-imports': ['error'],
|
||||
},
|
||||
},
|
||||
],
|
||||
);
|
||||
|
Reference in New Issue
Block a user