From fccd91fd7454a2cef8c75e39f01f88723d71c3d4 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Mon, 7 Apr 2025 12:22:28 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=20perfectionist?= =?UTF-8?q?=20=E5=AF=BC=E5=85=A5=E6=8E=92=E5=BA=8F=E8=A7=84=E5=88=99?= =?UTF-8?q?=EF=BC=9A=E9=A6=96=E5=85=88=E6=98=AF=E7=B1=BB=E5=9E=8B=E5=AF=BC?= =?UTF-8?q?=E5=85=A5=EF=BC=88type=EF=BC=89=EF=BC=8C=E7=84=B6=E5=90=8E?= =?UTF-8?q?=E6=98=AF=20UI=20=E5=92=8C=E7=BB=84=E4=BB=B6=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=EF=BC=8C=E6=8E=A5=E7=9D=80=E6=98=AF=E5=B7=A5=E5=85=B7=E5=92=8C?= =?UTF-8?q?=E5=87=BD=E6=95=B0=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/configs/perfectionist.ts | 35 +++++++++++-------- .../lint-configs/prettier-config/index.mjs | 2 +- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/internal/lint-configs/eslint-config/src/configs/perfectionist.ts b/internal/lint-configs/eslint-config/src/configs/perfectionist.ts index d4fd0bb8c..faedc690b 100644 --- a/internal/lint-configs/eslint-config/src/configs/perfectionist.ts +++ b/internal/lint-configs/eslint-config/src/configs/perfectionist.ts @@ -24,28 +24,33 @@ export async function perfectionist(): Promise { { customGroups: { type: { - 'vben-core-type': ['^@vben-core/.+'], - 'vben-type': ['^@vben/.+'], - 'vue-type': ['^vue$', '^vue-.+', '^@vue/.+'], + 'type-adapter': ['^#/adapter/.+'], + 'type-api': ['^#/api/.+'], + 'type-others': ['.*'], }, value: { - vben: ['^@vben/.+'], - 'vben-core': ['^@vben-core/.+'], - vue: ['^vue$', '^vue-.+', '^@vue/.+'], + 'ui-common': ['^@vben/common-ui'], + 'ui-antd': ['^ant-design-vue'], + 'ui-icons': ['^@vben/icons'], + 'local-components': ['^\\./modules/.+\\.vue$', '^\\./components/.+\\.vue$'], + 'other-components': ['^#/components/.+'], + 'utils-locale': ['^#/locales'], + 'vue-core': ['^vue$'], + 'utils-adapter': ['^#/adapter/.+'], + 'utils-api': ['^#/api/system/.+', '^#/api/.+'], + 'utils-functions': ['^#/utils/.+'], + 'local-data': ['^\\./data$', '^\\./data.ts$'], }, }, environment: 'node', groups: [ - ['external-type', 'builtin-type', 'type'], - 'vue-type', - 'vben-type', - 'vben-core-type', - ['parent-type', 'sibling-type', 'index-type'], - ['internal-type'], + ['type-adapter', 'type-api', 'type-others', 'external-type', 'builtin-type', 'type', 'parent-type', 'sibling-type', 'index-type', 'internal-type'], + + ['ui-common', 'ui-antd', 'ui-icons', 'local-components', 'other-components'], + + ['utils-locale', 'vue-core', 'utils-adapter', 'utils-api', 'utils-functions', 'local-data'], + 'builtin', - 'vue', - 'vben', - 'vben-core', 'external', 'internal', ['parent', 'sibling', 'index'], diff --git a/internal/lint-configs/prettier-config/index.mjs b/internal/lint-configs/prettier-config/index.mjs index f6a20c8b4..91416aa10 100644 --- a/internal/lint-configs/prettier-config/index.mjs +++ b/internal/lint-configs/prettier-config/index.mjs @@ -10,7 +10,7 @@ export default { }, ], plugins: ['prettier-plugin-tailwindcss'], - printWidth: 80, + printWidth: 120, proseWrap: 'never', semi: true, singleQuote: true, -- Gitee