refactor: 重新组织 ESLint 插件配置,添加区域注释以提高可读性
This commit is contained in:
@ -53,6 +53,7 @@ export default defineConfigWithVueTs(
|
|||||||
...oxlint.configs['flat/recommended'],
|
...oxlint.configs['flat/recommended'],
|
||||||
skipFormatting,
|
skipFormatting,
|
||||||
|
|
||||||
|
// region >> eslint-plugin-unicorn >>
|
||||||
eslintPluginUnicorn.configs.recommended,
|
eslintPluginUnicorn.configs.recommended,
|
||||||
{
|
{
|
||||||
rules: {
|
rules: {
|
||||||
@ -63,7 +64,9 @@ export default defineConfigWithVueTs(
|
|||||||
'unicorn/prevent-abbreviations': 'off',
|
'unicorn/prevent-abbreviations': 'off',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
// endregion <<< eslint-plugin-unicorn <<<
|
||||||
|
|
||||||
|
// region >>> eslint-plugin-import-x >>>
|
||||||
eslintPluginImportX.flatConfigs.recommended,
|
eslintPluginImportX.flatConfigs.recommended,
|
||||||
{
|
{
|
||||||
rules: {
|
rules: {
|
||||||
@ -72,6 +75,19 @@ export default defineConfigWithVueTs(
|
|||||||
'import-x/first': 'error',
|
'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: {
|
rules: {
|
||||||
@ -91,16 +107,4 @@ export default defineConfigWithVueTs(
|
|||||||
'vue/multi-word-component-names': 'off',
|
'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