diff --git a/.prettierignore b/.prettierignore index 8c038738..43acec58 100644 --- a/.prettierignore +++ b/.prettierignore @@ -3,6 +3,7 @@ dist .output.js node_modules .nvmrc +coverage **/*.svg diff --git a/.stylelintignore b/.stylelintignore index 90c340b0..f4b2db2c 100644 --- a/.stylelintignore +++ b/.stylelintignore @@ -1,3 +1,4 @@ dist public __tests__ +coverage diff --git a/apps/web-antd/src/layouts/basic.vue b/apps/web-antd/src/layouts/basic.vue index 7f7b8c6f..174058aa 100644 --- a/apps/web-antd/src/layouts/basic.vue +++ b/apps/web-antd/src/layouts/basic.vue @@ -96,16 +96,16 @@ function handleNoticeClear() { diff --git a/apps/web-antd/src/views/_essential/authentication/login.vue b/apps/web-antd/src/views/_essential/authentication/login.vue index 78b03a6f..2fb76ea8 100644 --- a/apps/web-antd/src/views/_essential/authentication/login.vue +++ b/apps/web-antd/src/views/_essential/authentication/login.vue @@ -69,9 +69,9 @@ const loginLoading = computed(() => { diff --git a/apps/web-antd/src/views/_essential/fallback/internal-error.vue b/apps/web-antd/src/views/_essential/fallback/internal-error.vue index bca08e3d..bf581764 100644 --- a/apps/web-antd/src/views/_essential/fallback/internal-error.vue +++ b/apps/web-antd/src/views/_essential/fallback/internal-error.vue @@ -3,5 +3,5 @@ import { Fallback } from '@vben/common-ui'; diff --git a/internal/lint-configs/eslint-config/src/configs/perfectionist.ts b/internal/lint-configs/eslint-config/src/configs/perfectionist.ts index 86814fa4..250a4525 100644 --- a/internal/lint-configs/eslint-config/src/configs/perfectionist.ts +++ b/internal/lint-configs/eslint-config/src/configs/perfectionist.ts @@ -81,7 +81,41 @@ export async function perfectionist(): Promise { type: 'natural', }, ], - 'perfectionist/sort-vue-attributes': 'off', + 'perfectionist/sort-vue-attributes': [ + 'error', + { + // Based on: https://vuejs.org/style-guide/rules-recommended.html#element-attribute-order + 'custom-groups': { + /* eslint-disable perfectionist/sort-objects */ + DEFINITION: '*(is|:is|v-is)', + LIST_RENDERING: 'v-for', + CONDITIONALS: 'v-*(else-if|if|else|show|cloak)', + RENDER_MODIFIERS: 'v-*(pre|once)', + GLOBAL: '*(:id|id)', + UNIQUE: '*(ref|key|:ref|:key)', + SLOT: '*(v-slot|slot)', + TWO_WAY_BINDING: '*(v-model|v-model:*)', + // OTHER_DIRECTIVES e.g. 'v-custom-directive' + EVENTS: '*(v-on|@*)', + CONTENT: 'v-*(html|text)', + /* eslint-enable perfectionist/sort-objects */ + }, + groups: [ + 'DEFINITION', + 'LIST_RENDERING', + 'CONDITIONALS', + 'RENDER_MODIFIERS', + 'GLOBAL', + 'UNIQUE', + 'SLOT', + 'TWO_WAY_BINDING', + 'unknown', + 'EVENTS', + 'CONTENT', + ], + type: 'natural', + }, + ], }, }, ]; diff --git a/packages/@core/uikit/layout-ui/src/components/layout-footer.vue b/packages/@core/uikit/layout-ui/src/components/layout-footer.vue index 07a69017..409d26f5 100644 --- a/packages/@core/uikit/layout-ui/src/components/layout-footer.vue +++ b/packages/@core/uikit/layout-ui/src/components/layout-footer.vue @@ -65,8 +65,8 @@ const style = computed((): CSSProperties => {