Skip to content

Commit 081d2ae

Browse files
authored
perf: format code with better style (vbenjs#5283)
1 parent 4d81b9d commit 081d2ae

File tree

288 files changed

+1805
-2164
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

288 files changed

+1805
-2164
lines changed

.lintstagedrc.mjs

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
export default {
2+
'*.md': ['prettier --cache --ignore-unknown --write'],
3+
'*.vue': [
4+
'prettier --write',
5+
'eslint --cache --fix',
6+
'stylelint --fix --allow-empty-input',
7+
],
28
'*.{js,jsx,ts,tsx}': [
39
'prettier --cache --ignore-unknown --write',
410
'eslint --cache --fix',
@@ -7,14 +13,8 @@ export default {
713
'prettier --cache --ignore-unknown --write',
814
'stylelint --fix --allow-empty-input',
915
],
10-
'*.md': ['prettier --cache --ignore-unknown --write'],
11-
'*.vue': [
12-
'prettier --write',
13-
'eslint --cache --fix',
14-
'stylelint --fix --allow-empty-input',
15-
],
16+
'package.json': ['prettier --cache --write'],
1617
'{!(package)*.json,*.code-snippets,.!(browserslist)*rc}': [
1718
'prettier --cache --write--parser json',
1819
],
19-
'package.json': ['prettier --cache --write'],
2020
};

apps/web-antd/src/adapter/component/index.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
* 可用于 vben-form、vben-modal、vben-drawer 等组件使用,
44
*/
55

6+
import type { Component, SetupContext } from 'vue';
7+
68
import type { BaseFormComponentType } from '@vben/common-ui';
79

8-
import type { Component, SetupContext } from 'vue';
910
import { h } from 'vue';
1011

1112
import { ApiComponent, globalShareState, IconPicker } from '@vben/common-ui';

apps/web-antd/src/locales/index.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
import type { LocaleSetupOptions, SupportedLanguagesType } from '@vben/locales';
21
import type { Locale } from 'ant-design-vue/es/locale';
32

43
import type { App } from 'vue';
4+
5+
import type { LocaleSetupOptions, SupportedLanguagesType } from '@vben/locales';
6+
57
import { ref } from 'vue';
68

79
import {

apps/web-antd/src/views/dashboard/analytics/analytics-trends.vue

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
<script lang="ts" setup>
2+
import type { EchartsUIType } from '@vben/plugins/echarts';
3+
24
import { onMounted, ref } from 'vue';
35
4-
import {
5-
EchartsUI,
6-
type EchartsUIType,
7-
useEcharts,
8-
} from '@vben/plugins/echarts';
6+
import { EchartsUI, useEcharts } from '@vben/plugins/echarts';
97
108
const chartRef = ref<EchartsUIType>();
119
const { renderEcharts } = useEcharts(chartRef);

apps/web-antd/src/views/dashboard/analytics/analytics-visits-data.vue

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
<script lang="ts" setup>
2+
import type { EchartsUIType } from '@vben/plugins/echarts';
3+
24
import { onMounted, ref } from 'vue';
35
4-
import {
5-
EchartsUI,
6-
type EchartsUIType,
7-
useEcharts,
8-
} from '@vben/plugins/echarts';
6+
import { EchartsUI, useEcharts } from '@vben/plugins/echarts';
97
108
const chartRef = ref<EchartsUIType>();
119
const { renderEcharts } = useEcharts(chartRef);

apps/web-antd/src/views/dashboard/analytics/analytics-visits-sales.vue

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
<script lang="ts" setup>
2+
import type { EchartsUIType } from '@vben/plugins/echarts';
3+
24
import { onMounted, ref } from 'vue';
35
4-
import {
5-
EchartsUI,
6-
type EchartsUIType,
7-
useEcharts,
8-
} from '@vben/plugins/echarts';
6+
import { EchartsUI, useEcharts } from '@vben/plugins/echarts';
97
108
const chartRef = ref<EchartsUIType>();
119
const { renderEcharts } = useEcharts(chartRef);

apps/web-antd/src/views/dashboard/analytics/analytics-visits-source.vue

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
<script lang="ts" setup>
2+
import type { EchartsUIType } from '@vben/plugins/echarts';
3+
24
import { onMounted, ref } from 'vue';
35
4-
import {
5-
EchartsUI,
6-
type EchartsUIType,
7-
useEcharts,
8-
} from '@vben/plugins/echarts';
6+
import { EchartsUI, useEcharts } from '@vben/plugins/echarts';
97
108
const chartRef = ref<EchartsUIType>();
119
const { renderEcharts } = useEcharts(chartRef);

apps/web-antd/src/views/dashboard/analytics/analytics-visits.vue

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
<script lang="ts" setup>
2+
import type { EchartsUIType } from '@vben/plugins/echarts';
3+
24
import { onMounted, ref } from 'vue';
35
4-
import {
5-
EchartsUI,
6-
type EchartsUIType,
7-
useEcharts,
8-
} from '@vben/plugins/echarts';
6+
import { EchartsUI, useEcharts } from '@vben/plugins/echarts';
97
108
const chartRef = ref<EchartsUIType>();
119
const { renderEcharts } = useEcharts(chartRef);

apps/web-antd/src/views/dashboard/analytics/index.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ import {
1515
} from '@vben/icons';
1616
1717
import AnalyticsTrends from './analytics-trends.vue';
18-
import AnalyticsVisits from './analytics-visits.vue';
1918
import AnalyticsVisitsData from './analytics-visits-data.vue';
2019
import AnalyticsVisitsSales from './analytics-visits-sales.vue';
2120
import AnalyticsVisitsSource from './analytics-visits-source.vue';
21+
import AnalyticsVisits from './analytics-visits.vue';
2222
2323
const overviewItems: AnalysisOverviewItem[] = [
2424
{

apps/web-ele/src/adapter/component/index.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
* 可用于 vben-form、vben-modal、vben-drawer 等组件使用,
44
*/
55

6+
import type { Component, SetupContext } from 'vue';
7+
68
import type { BaseFormComponentType } from '@vben/common-ui';
79
import type { Recordable } from '@vben/types';
810

9-
import type { Component, SetupContext } from 'vue';
1011
import { h } from 'vue';
1112

1213
import { ApiComponent, globalShareState, IconPicker } from '@vben/common-ui';

apps/web-ele/src/locales/index.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
import type { LocaleSetupOptions, SupportedLanguagesType } from '@vben/locales';
21
import type { Language } from 'element-plus/es/locale';
32

43
import type { App } from 'vue';
4+
5+
import type { LocaleSetupOptions, SupportedLanguagesType } from '@vben/locales';
6+
57
import { ref } from 'vue';
68

79
import {

apps/web-ele/src/views/dashboard/analytics/analytics-trends.vue

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
<script lang="ts" setup>
2+
import type { EchartsUIType } from '@vben/plugins/echarts';
3+
24
import { onMounted, ref } from 'vue';
35
4-
import {
5-
EchartsUI,
6-
type EchartsUIType,
7-
useEcharts,
8-
} from '@vben/plugins/echarts';
6+
import { EchartsUI, useEcharts } from '@vben/plugins/echarts';
97
108
const chartRef = ref<EchartsUIType>();
119
const { renderEcharts } = useEcharts(chartRef);

apps/web-ele/src/views/dashboard/analytics/analytics-visits-data.vue

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
<script lang="ts" setup>
2+
import type { EchartsUIType } from '@vben/plugins/echarts';
3+
24
import { onMounted, ref } from 'vue';
35
4-
import {
5-
EchartsUI,
6-
type EchartsUIType,
7-
useEcharts,
8-
} from '@vben/plugins/echarts';
6+
import { EchartsUI, useEcharts } from '@vben/plugins/echarts';
97
108
const chartRef = ref<EchartsUIType>();
119
const { renderEcharts } = useEcharts(chartRef);

apps/web-ele/src/views/dashboard/analytics/analytics-visits-sales.vue

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
<script lang="ts" setup>
2+
import type { EchartsUIType } from '@vben/plugins/echarts';
3+
24
import { onMounted, ref } from 'vue';
35
4-
import {
5-
EchartsUI,
6-
type EchartsUIType,
7-
useEcharts,
8-
} from '@vben/plugins/echarts';
6+
import { EchartsUI, useEcharts } from '@vben/plugins/echarts';
97
108
const chartRef = ref<EchartsUIType>();
119
const { renderEcharts } = useEcharts(chartRef);

apps/web-ele/src/views/dashboard/analytics/analytics-visits-source.vue

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
<script lang="ts" setup>
2+
import type { EchartsUIType } from '@vben/plugins/echarts';
3+
24
import { onMounted, ref } from 'vue';
35
4-
import {
5-
EchartsUI,
6-
type EchartsUIType,
7-
useEcharts,
8-
} from '@vben/plugins/echarts';
6+
import { EchartsUI, useEcharts } from '@vben/plugins/echarts';
97
108
const chartRef = ref<EchartsUIType>();
119
const { renderEcharts } = useEcharts(chartRef);

apps/web-ele/src/views/dashboard/analytics/analytics-visits.vue

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
<script lang="ts" setup>
2+
import type { EchartsUIType } from '@vben/plugins/echarts';
3+
24
import { onMounted, ref } from 'vue';
35
4-
import {
5-
EchartsUI,
6-
type EchartsUIType,
7-
useEcharts,
8-
} from '@vben/plugins/echarts';
6+
import { EchartsUI, useEcharts } from '@vben/plugins/echarts';
97
108
const chartRef = ref<EchartsUIType>();
119
const { renderEcharts } = useEcharts(chartRef);

apps/web-ele/src/views/dashboard/analytics/index.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ import {
1515
} from '@vben/icons';
1616
1717
import AnalyticsTrends from './analytics-trends.vue';
18-
import AnalyticsVisits from './analytics-visits.vue';
1918
import AnalyticsVisitsData from './analytics-visits-data.vue';
2019
import AnalyticsVisitsSales from './analytics-visits-sales.vue';
2120
import AnalyticsVisitsSource from './analytics-visits-source.vue';
21+
import AnalyticsVisits from './analytics-visits.vue';
2222
2323
const overviewItems: AnalysisOverviewItem[] = [
2424
{

apps/web-naive/src/adapter/component/index.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
* 可用于 vben-form、vben-modal、vben-drawer 等组件使用,
44
*/
55

6+
import type { Component, SetupContext } from 'vue';
7+
68
import type { BaseFormComponentType } from '@vben/common-ui';
79

8-
import type { Component, SetupContext } from 'vue';
910
import { h } from 'vue';
1011

1112
import { ApiComponent, globalShareState, IconPicker } from '@vben/common-ui';

apps/web-naive/src/locales/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import type { LocaleSetupOptions, SupportedLanguagesType } from '@vben/locales';
2-
31
import type { App } from 'vue';
42

3+
import type { LocaleSetupOptions, SupportedLanguagesType } from '@vben/locales';
4+
55
import {
66
$t,
77
setupI18n as coreSetup,

apps/web-naive/src/views/dashboard/analytics/analytics-trends.vue

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
<script lang="ts" setup>
2+
import type { EchartsUIType } from '@vben/plugins/echarts';
3+
24
import { onMounted, ref } from 'vue';
35
4-
import {
5-
EchartsUI,
6-
type EchartsUIType,
7-
useEcharts,
8-
} from '@vben/plugins/echarts';
6+
import { EchartsUI, useEcharts } from '@vben/plugins/echarts';
97
108
const chartRef = ref<EchartsUIType>();
119
const { renderEcharts } = useEcharts(chartRef);

apps/web-naive/src/views/dashboard/analytics/analytics-visits-data.vue

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
<script lang="ts" setup>
2+
import type { EchartsUIType } from '@vben/plugins/echarts';
3+
24
import { onMounted, ref } from 'vue';
35
4-
import {
5-
EchartsUI,
6-
type EchartsUIType,
7-
useEcharts,
8-
} from '@vben/plugins/echarts';
6+
import { EchartsUI, useEcharts } from '@vben/plugins/echarts';
97
108
const chartRef = ref<EchartsUIType>();
119
const { renderEcharts } = useEcharts(chartRef);

apps/web-naive/src/views/dashboard/analytics/analytics-visits-sales.vue

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
<script lang="ts" setup>
2+
import type { EchartsUIType } from '@vben/plugins/echarts';
3+
24
import { onMounted, ref } from 'vue';
35
4-
import {
5-
EchartsUI,
6-
type EchartsUIType,
7-
useEcharts,
8-
} from '@vben/plugins/echarts';
6+
import { EchartsUI, useEcharts } from '@vben/plugins/echarts';
97
108
const chartRef = ref<EchartsUIType>();
119
const { renderEcharts } = useEcharts(chartRef);

apps/web-naive/src/views/dashboard/analytics/analytics-visits-source.vue

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
<script lang="ts" setup>
2+
import type { EchartsUIType } from '@vben/plugins/echarts';
3+
24
import { onMounted, ref } from 'vue';
35
4-
import {
5-
EchartsUI,
6-
type EchartsUIType,
7-
useEcharts,
8-
} from '@vben/plugins/echarts';
6+
import { EchartsUI, useEcharts } from '@vben/plugins/echarts';
97
108
const chartRef = ref<EchartsUIType>();
119
const { renderEcharts } = useEcharts(chartRef);

apps/web-naive/src/views/dashboard/analytics/analytics-visits.vue

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
<script lang="ts" setup>
2+
import type { EchartsUIType } from '@vben/plugins/echarts';
3+
24
import { onMounted, ref } from 'vue';
35
4-
import {
5-
EchartsUI,
6-
type EchartsUIType,
7-
useEcharts,
8-
} from '@vben/plugins/echarts';
6+
import { EchartsUI, useEcharts } from '@vben/plugins/echarts';
97
108
const chartRef = ref<EchartsUIType>();
119
const { renderEcharts } = useEcharts(chartRef);

apps/web-naive/src/views/dashboard/analytics/index.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ import {
1515
} from '@vben/icons';
1616
1717
import AnalyticsTrends from './analytics-trends.vue';
18-
import AnalyticsVisits from './analytics-visits.vue';
1918
import AnalyticsVisitsData from './analytics-visits-data.vue';
2019
import AnalyticsVisitsSales from './analytics-visits-sales.vue';
2120
import AnalyticsVisitsSource from './analytics-visits-source.vue';
21+
import AnalyticsVisits from './analytics-visits.vue';
2222
2323
const overviewItems: AnalysisOverviewItem[] = [
2424
{

apps/web-naive/src/views/demos/naive/index.vue

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<script lang="ts" setup>
2+
import type { NotificationType } from 'naive-ui';
3+
24
import { Page } from '@vben/common-ui';
35
4-
import { type NotificationType } from 'naive-ui';
56
import { NButton, NCard, NSpace, useMessage, useNotification } from 'naive-ui';
67
78
const notification = useNotification();

docs/.vitepress/config/en.mts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
import { type DefaultTheme, defineConfig } from 'vitepress';
1+
import type { DefaultTheme } from 'vitepress';
2+
3+
import { defineConfig } from 'vitepress';
24

35
import { version } from '../../../package.json';
46

docs/.vitepress/config/zh.mts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
import { type DefaultTheme, defineConfig } from 'vitepress';
1+
import type { DefaultTheme } from 'vitepress';
2+
3+
import { defineConfig } from 'vitepress';
24

35
import { version } from '../../../package.json';
46

docs/.vitepress/theme/components/site-layout.vue

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import {
1010
1111
// import { useAntdDesignTokens } from '@vben/hooks';
1212
// import { initPreferences } from '@vben/preferences';
13-
1413
import { ConfigProvider, theme } from 'ant-design-vue';
1514
import mediumZoom from 'medium-zoom';
1615
import { useRoute } from 'vitepress';

0 commit comments

Comments
 (0)