Commit ba2415c3b42b0a02f3c1fe954a941280171ea80a

Authored by vben
1 parent 84a5fc12

chore: Extract lint config

Too many changes to show.

To preserve performance only 21 of 130 files are displayed.

.eslintrc.js
1 1 module.exports = {
2 2 root: true,
3   - env: {
4   - browser: true,
5   - node: true,
6   - es6: true,
7   - },
8   - parser: 'vue-eslint-parser',
9   - parserOptions: {
10   - parser: '@typescript-eslint/parser',
11   - ecmaVersion: 2020,
12   - sourceType: 'module',
13   - jsxPragma: 'React',
14   - ecmaFeatures: {
15   - jsx: true,
16   - },
17   - },
18   - extends: [
19   - 'plugin:vue/vue3-recommended',
20   - 'plugin:@typescript-eslint/recommended',
21   - 'plugin:prettier/recommended',
22   - ],
23   - rules: {
24   - 'vue/script-setup-uses-vars': 'error',
25   - '@typescript-eslint/ban-ts-ignore': 'off',
26   - '@typescript-eslint/explicit-function-return-type': 'off',
27   - '@typescript-eslint/no-explicit-any': 'off',
28   - '@typescript-eslint/no-var-requires': 'off',
29   - '@typescript-eslint/no-empty-function': 'off',
30   - 'vue/custom-event-name-casing': 'off',
31   - 'no-use-before-define': 'off',
32   - '@typescript-eslint/no-use-before-define': 'off',
33   - '@typescript-eslint/ban-ts-comment': 'off',
34   - '@typescript-eslint/ban-types': 'off',
35   - '@typescript-eslint/no-non-null-assertion': 'off',
36   - '@typescript-eslint/explicit-module-boundary-types': 'off',
37   - '@typescript-eslint/no-unused-vars': [
38   - 'error',
39   - {
40   - argsIgnorePattern: '^_',
41   - varsIgnorePattern: '^_',
42   - },
43   - ],
44   - 'no-unused-vars': [
45   - 'error',
46   - {
47   - argsIgnorePattern: '^_',
48   - varsIgnorePattern: '^_',
49   - },
50   - ],
51   - 'space-before-function-paren': 'off',
52   -
53   - 'vue/attributes-order': 'off',
54   - 'vue/one-component-per-file': 'off',
55   - 'vue/html-closing-bracket-newline': 'off',
56   - 'vue/max-attributes-per-line': 'off',
57   - 'vue/multiline-html-element-content-newline': 'off',
58   - 'vue/singleline-html-element-content-newline': 'off',
59   - 'vue/attribute-hyphenation': 'off',
60   - 'vue/require-default-prop': 'off',
61   - 'vue/require-explicit-emits': 'off',
62   - 'vue/html-self-closing': [
63   - 'error',
64   - {
65   - html: {
66   - void: 'always',
67   - normal: 'never',
68   - component: 'always',
69   - },
70   - svg: 'always',
71   - math: 'always',
72   - },
73   - ],
74   - 'vue/multi-word-component-names': 'off',
75   - },
  3 + extends: ['@vben'],
76 4 };
... ...
.github/workflows/deploy.yml
... ... @@ -98,7 +98,7 @@ jobs:
98 98  
99 99 - name: Build
100 100 env:
101   - NODE_OPTIONS: "--max_old_space_size=4096"
  101 + NODE_OPTIONS: '--max_old_space_size=4096'
102 102 run: |
103 103 yarn install
104 104 yarn run build
... ... @@ -116,8 +116,3 @@ jobs:
116 116 PUBLISH_BRANCH: gh-pages
117 117 PUBLISH_DIR: ./dist
118 118 CNAME: vben.vvbin.cn
119   -
120   -
121   -
122   -
123   -
... ...
.gitignore
1 1 node_modules
2 2 .DS_Store
3 3 dist
4   -.npmrc
5 4 .cache
  5 +.turbo
6 6  
7 7 tests/server/static
8 8 tests/server/static/upload
... ...
.husky/pre-commit
... ... @@ -7,4 +7,4 @@
7 7 PATH="/usr/local/bin:$PATH"
8 8  
9 9 # Format and submit code according to lintstagedrc.js configuration
10   -npm run lint:lint-staged
  10 +pnpm exec lint-staged
... ...
.npmrc 0 โ†’ 100644
  1 +public-hoist-pattern[]=husky
  2 +public-hoist-pattern[]=*eslint*
  3 +public-hoist-pattern[]=*prettier*
  4 +public-hoist-pattern[]=lint-staged
  5 +public-hoist-pattern[]=*stylelint*
  6 +public-hoist-pattern[]=@commitlint/cli
  7 +public-hoist-pattern[]=@vben/eslint-config
... ...
.prettierignore
1   -/dist/*
  1 +dist
2 2 .local
3 3 .output.js
4   -/node_modules/**
  4 +node_modules
5 5  
6 6 **/*.svg
7 7 **/*.sh
8 8  
9   -/public/*
  9 +public
  10 +.npmrc
... ...
.prettierrc.js
... ... @@ -7,4 +7,5 @@ module.exports = {
7 7 proseWrap: 'never',
8 8 htmlWhitespaceSensitivity: 'strict',
9 9 endOfLine: 'auto',
  10 + plugins: ['prettier-plugin-packagejson'],
10 11 };
... ...
.stylelintignore
1   -/dist/*
2   -/public/*
3   -public/*
  1 +dist
  2 +public
... ...
.stylelintrc.js
1 1 module.exports = {
2 2 root: true,
3   - plugins: ['stylelint-order'],
4   - extends: ['stylelint-config-standard'],
5   - customSyntax: 'postcss-html',
6   - rules: {
7   - 'function-no-unknown': null,
8   - 'selector-class-pattern': null,
9   - 'selector-pseudo-class-no-unknown': [
10   - true,
11   - {
12   - ignorePseudoClasses: ['global', 'deep'],
13   - },
14   - ],
15   - 'selector-pseudo-element-no-unknown': [
16   - true,
17   - {
18   - ignorePseudoElements: ['v-deep'],
19   - },
20   - ],
21   - 'at-rule-no-unknown': [
22   - true,
23   - {
24   - ignoreAtRules: [
25   - 'tailwind',
26   - 'apply',
27   - 'variants',
28   - 'responsive',
29   - 'screen',
30   - 'function',
31   - 'if',
32   - 'each',
33   - 'include',
34   - 'mixin',
35   - ],
36   - },
37   - ],
38   - 'no-empty-source': null,
39   - 'string-quotes': null,
40   - 'named-grid-areas-no-invalid': null,
41   - 'unicode-bom': 'never',
42   - 'no-descending-specificity': null,
43   - 'font-family-no-missing-generic-family-keyword': null,
44   - 'declaration-colon-space-after': 'always-single-line',
45   - 'declaration-colon-space-before': 'never',
46   - // 'declaration-block-trailing-semicolon': 'always',
47   - 'rule-empty-line-before': [
48   - 'always',
49   - {
50   - ignore: ['after-comment', 'first-nested'],
51   - },
52   - ],
53   - 'unit-no-unknown': [true, { ignoreUnits: ['rpx'] }],
54   - 'order/order': [
55   - [
56   - 'dollar-variables',
57   - 'custom-properties',
58   - 'at-rules',
59   - 'declarations',
60   - {
61   - type: 'at-rule',
62   - name: 'supports',
63   - },
64   - {
65   - type: 'at-rule',
66   - name: 'media',
67   - },
68   - 'rules',
69   - ],
70   - { severity: 'warning' },
71   - ],
72   - },
73   - ignoreFiles: ['**/*.js', '**/*.jsx', '**/*.tsx', '**/*.ts'],
74   - overrides: [
75   - {
76   - files: ['*.vue', '**/*.vue', '*.html', '**/*.html'],
77   - extends: ['stylelint-config-recommended'],
78   - rules: {
79   - 'keyframes-name-pattern': null,
80   - 'selector-pseudo-class-no-unknown': [
81   - true,
82   - {
83   - ignorePseudoClasses: ['deep', 'global'],
84   - },
85   - ],
86   - 'selector-pseudo-element-no-unknown': [
87   - true,
88   - {
89   - ignorePseudoElements: ['v-deep', 'v-global', 'v-slotted'],
90   - },
91   - ],
92   - },
93   - },
94   - {
95   - files: ['*.less', '**/*.less'],
96   - customSyntax: 'postcss-less',
97   - extends: ['stylelint-config-standard', 'stylelint-config-recommended-vue'],
98   - },
99   - ],
  3 + extends: ['@vben/stylelint-config'],
100 4 };
... ...
.vscode/settings.json
... ... @@ -84,7 +84,8 @@
84 84 "editor.defaultFormatter": "esbenp.prettier-vscode"
85 85 },
86 86 "editor.codeActionsOnSave": {
87   - "source.fixAll.eslint": true
  87 + "source.fixAll.eslint": true,
  88 + "source.fixAll.stylelint": true
88 89 },
89 90 "[vue]": {
90 91 "editor.codeActionsOnSave": {
... ... @@ -165,7 +166,7 @@
165 166 "*.tsx": "$(capture).test.ts, $(capture).test.tsx",
166 167 "*.env": "$(capture).env.*",
167 168 "CHANGELOG.md": "CHANGELOG*",
168   - "package.json": "pnpm-lock.yaml,pnpm-workspace.yaml,LICENSE,.gitattributes,.gitignore,.gitpod.yml,CNAME,README*",
  169 + "package.json": "pnpm-lock.yaml,pnpm-workspace.yaml,LICENSE,.gitattributes,.gitignore,.gitpod.yml,CNAME,README*,.npmrc",
169 170 ".eslintrc.js": ".eslintignore,.prettierignore,.stylelintignore,.commitlintrc.js,.prettierrc.js,.stylelintrc.js"
170 171 },
171 172 "terminal.integrated.scrollback": 10000
... ...
_internal/.gitkeep deleted 100644 โ†’ 0
build/vite/plugin/mock.ts
... ... @@ -6,7 +6,7 @@ import { viteMockServe } from 'vite-plugin-mock';
6 6  
7 7 export function configMockPlugin(isBuild: boolean) {
8 8 return viteMockServe({
9   - ignore: /^\_/,
  9 + ignore: /^_/,
10 10 mockPath: 'mock',
11 11 localEnabled: !isBuild,
12 12 prodEnabled: isBuild,
... ...
index.html
... ... @@ -34,39 +34,39 @@
34 34  
35 35 .app-loading {
36 36 display: flex;
  37 + flex-direction: column;
  38 + align-items: center;
  39 + justify-content: center;
37 40 width: 100%;
38 41 height: 100%;
39   - justify-content: center;
40   - align-items: center;
41   - flex-direction: column;
42 42 background-color: #f4f7f9;
43 43 }
44 44  
45 45 .app-loading .app-loading-wrap {
  46 + display: flex;
46 47 position: absolute;
47 48 top: 50%;
48 49 left: 50%;
49   - display: flex;
50   - transform: translate3d(-50%, -50%, 0);
51   - justify-content: center;
52   - align-items: center;
53 50 flex-direction: column;
  51 + align-items: center;
  52 + justify-content: center;
  53 + transform: translate3d(-50%, -50%, 0);
54 54 }
55 55  
56 56 .app-loading .dots {
57 57 display: flex;
58   - padding: 98px;
59   - justify-content: center;
60 58 align-items: center;
  59 + justify-content: center;
  60 + padding: 98px;
61 61 }
62 62  
63 63 .app-loading .app-loading-title {
64 64 display: flex;
  65 + align-items: center;
  66 + justify-content: center;
65 67 margin-top: 30px;
66   - font-size: 30px;
67 68 color: rgb(0 0 0 / 85%);
68   - justify-content: center;
69   - align-items: center;
  69 + font-size: 30px;
70 70 }
71 71  
72 72 .app-loading .app-loading-logo {
... ... @@ -77,28 +77,28 @@
77 77 }
78 78  
79 79 .dot {
80   - position: relative;
81 80 display: inline-block;
  81 + position: relative;
  82 + box-sizing: border-box;
82 83 width: 48px;
83 84 height: 48px;
84 85 margin-top: 30px;
85   - font-size: 32px;
86 86 transform: rotate(45deg);
87   - box-sizing: border-box;
88   - animation: antRotate 1.2s infinite linear;
  87 + animation: ant-rotate 1.2s infinite linear;
  88 + font-size: 32px;
89 89 }
90 90  
91 91 .dot i {
92   - position: absolute;
93 92 display: block;
  93 + position: absolute;
94 94 width: 20px;
95 95 height: 20px;
96   - background-color: #0065cc;
97   - border-radius: 100%;
98   - opacity: 30%;
99 96 transform: scale(0.75);
100   - animation: antSpinMove 1s infinite linear alternate;
101 97 transform-origin: 50% 50%;
  98 + animation: ant-spin-move 1s infinite linear alternate;
  99 + border-radius: 100%;
  100 + opacity: 0.3;
  101 + background-color: #0065cc;
102 102 }
103 103  
104 104 .dot i:nth-child(1) {
... ... @@ -123,24 +123,28 @@
123 123 left: 0;
124 124 animation-delay: 1.2s;
125 125 }
126   - @keyframes antRotate {
  126 +
  127 + @keyframes ant-rotate {
127 128 to {
128 129 transform: rotate(405deg);
129 130 }
130 131 }
131   - @keyframes antRotate {
  132 +
  133 + @keyframes ant-rotate {
132 134 to {
133 135 transform: rotate(405deg);
134 136 }
135 137 }
136   - @keyframes antSpinMove {
  138 +
  139 + @keyframes ant-spin-move {
137 140 to {
138   - opacity: 100%;
  141 + opacity: 1;
139 142 }
140 143 }
141   - @keyframes antSpinMove {
  144 +
  145 + @keyframes ant-spin-move {
142 146 to {
143   - opacity: 100%;
  147 + opacity: 1;
144 148 }
145 149 }
146 150 </style>
... ...
internal/eslint-config/build.config.ts 0 โ†’ 100644
  1 +import { defineBuildConfig } from 'unbuild';
  2 +
  3 +export default defineBuildConfig({
  4 + clean: true,
  5 + entries: ['src/index'],
  6 + declaration: true,
  7 + rollup: {
  8 + emitCJS: true,
  9 + },
  10 +});
... ...
internal/eslint-config/package.json 0 โ†’ 100644
  1 +{
  2 + "name": "@vben/eslint-config",
  3 + "version": "1.0.0",
  4 + "private": true,
  5 + "license": "MIT",
  6 + "exports": {
  7 + ".": {
  8 + "types": "./dist/index.d.ts",
  9 + "import": "./dist/index.mjs",
  10 + "require": "./dist/index.cjs"
  11 + }
  12 + },
  13 + "main": "./dist/index.cjs",
  14 + "module": "./dist/index.mjs",
  15 + "types": "./dist/index.d.ts",
  16 + "files": [
  17 + "dist"
  18 + ],
  19 + "scripts": {
  20 + "clean": "pnpm rimraf .turbo node_modules dist",
  21 + "stub": "pnpm unbuild --stub"
  22 + },
  23 + "devDependencies": {
  24 + "@typescript-eslint/eslint-plugin": "^5.57.0",
  25 + "@typescript-eslint/parser": "^5.57.0",
  26 + "eslint": "^8.37.0",
  27 + "eslint-config-prettier": "^8.8.0",
  28 + "eslint-plugin-prettier": "^4.2.1",
  29 + "eslint-plugin-vue": "^9.10.0",
  30 + "vue-eslint-parser": "^9.1.1"
  31 + }
  32 +}
... ...
internal/eslint-config/src/index.ts 0 โ†’ 100644
  1 +export default {
  2 + env: {
  3 + browser: true,
  4 + node: true,
  5 + es6: true,
  6 + },
  7 + parser: 'vue-eslint-parser',
  8 + parserOptions: {
  9 + parser: '@typescript-eslint/parser',
  10 + ecmaVersion: 2020,
  11 + sourceType: 'module',
  12 + jsxPragma: 'React',
  13 + ecmaFeatures: {
  14 + jsx: true,
  15 + },
  16 + project: './tsconfig.*?.json',
  17 + createDefaultProgram: false,
  18 + extraFileExtensions: ['.vue'],
  19 + },
  20 + plugins: ['vue', '@typescript-eslint'],
  21 + extends: [
  22 + 'eslint:recommended',
  23 + 'plugin:vue/vue3-recommended',
  24 + 'plugin:@typescript-eslint/recommended',
  25 + 'plugin:prettier/recommended',
  26 + ],
  27 + rules: {
  28 + 'no-case-declarations': 'off',
  29 + 'vue/script-setup-uses-vars': 'error',
  30 + 'vue/no-reserved-component-names': 'off',
  31 + '@typescript-eslint/ban-ts-ignore': 'off',
  32 + '@typescript-eslint/explicit-function-return-type': 'off',
  33 + '@typescript-eslint/no-explicit-any': 'off',
  34 + '@typescript-eslint/no-var-requires': 'off',
  35 + '@typescript-eslint/no-empty-function': 'off',
  36 + 'vue/custom-event-name-casing': 'off',
  37 + 'no-use-before-define': 'off',
  38 + '@typescript-eslint/no-use-before-define': 'off',
  39 + '@typescript-eslint/ban-ts-comment': 'off',
  40 + '@typescript-eslint/ban-types': 'off',
  41 + '@typescript-eslint/no-non-null-assertion': 'off',
  42 + '@typescript-eslint/explicit-module-boundary-types': 'off',
  43 + '@typescript-eslint/no-unused-vars': [
  44 + 'error',
  45 + {
  46 + argsIgnorePattern: '^_',
  47 + varsIgnorePattern: '^_',
  48 + },
  49 + ],
  50 + 'no-unused-vars': [
  51 + 'error',
  52 + {
  53 + argsIgnorePattern: '^_',
  54 + varsIgnorePattern: '^_',
  55 + },
  56 + ],
  57 + 'space-before-function-paren': 'off',
  58 +
  59 + 'vue/attributes-order': 'off',
  60 + 'vue/one-component-per-file': 'off',
  61 + 'vue/html-closing-bracket-newline': 'off',
  62 + 'vue/max-attributes-per-line': 'off',
  63 + 'vue/multiline-html-element-content-newline': 'off',
  64 + 'vue/singleline-html-element-content-newline': 'off',
  65 + 'vue/attribute-hyphenation': 'off',
  66 + 'vue/require-default-prop': 'off',
  67 + 'vue/require-explicit-emits': 'off',
  68 + 'vue/html-self-closing': [
  69 + 'error',
  70 + {
  71 + html: {
  72 + void: 'always',
  73 + normal: 'never',
  74 + component: 'always',
  75 + },
  76 + svg: 'always',
  77 + math: 'always',
  78 + },
  79 + ],
  80 + 'vue/multi-word-component-names': 'off',
  81 + },
  82 +};
... ...
internal/stylelint-config/build.config.ts 0 โ†’ 100644
  1 +import { defineBuildConfig } from 'unbuild';
  2 +
  3 +export default defineBuildConfig({
  4 + clean: true,
  5 + entries: ['src/index'],
  6 + declaration: true,
  7 + rollup: {
  8 + emitCJS: true,
  9 + },
  10 +});
... ...
internal/stylelint-config/package.json 0 โ†’ 100644
  1 +{
  2 + "name": "@vben/stylelint-config",
  3 + "version": "1.0.0",
  4 + "private": true,
  5 + "license": "MIT",
  6 + "exports": {
  7 + ".": {
  8 + "types": "./dist/index.d.ts",
  9 + "import": "./dist/index.mjs",
  10 + "require": "./dist/index.cjs"
  11 + }
  12 + },
  13 + "main": "./dist/index.cjs",
  14 + "module": "./dist/index.mjs",
  15 + "types": "./dist/index.d.ts",
  16 + "files": [
  17 + "dist"
  18 + ],
  19 + "scripts": {
  20 + "clean": "pnpm rimraf .turbo node_modules dist",
  21 + "stub": "pnpm unbuild --stub"
  22 + },
  23 + "devDependencies": {
  24 + "postcss": "^8.4.21",
  25 + "postcss-html": "^1.5.0",
  26 + "postcss-less": "^6.0.0",
  27 + "postcss-scss": "^4.0.6",
  28 + "prettier": "^2.8.7",
  29 + "stylelint": "^15.4.0",
  30 + "stylelint-config-property-sort-order-smacss": "^9.1.0",
  31 + "stylelint-config-recommended": "^11.0.0",
  32 + "stylelint-config-recommended-scss": "^9.0.1",
  33 + "stylelint-config-recommended-vue": "^1.4.0",
  34 + "stylelint-config-standard": "^32.0.0",
  35 + "stylelint-config-standard-scss": "^7.0.1",
  36 + "stylelint-order": "^6.0.3",
  37 + "stylelint-prettier": "^3.0.0"
  38 + }
  39 +}
... ...
internal/stylelint-config/src/index.ts 0 โ†’ 100644
  1 +export default {
  2 + extends: ['stylelint-config-standard', 'stylelint-config-property-sort-order-smacss'],
  3 + plugins: ['stylelint-order', 'stylelint-prettier'],
  4 + // customSyntax: 'postcss-html',
  5 + overrides: [
  6 + {
  7 + files: ['**/*.(css|html|vue)'],
  8 + customSyntax: 'postcss-html',
  9 + },
  10 + {
  11 + files: ['*.less', '**/*.less'],
  12 + customSyntax: 'postcss-less',
  13 + extends: ['stylelint-config-standard', 'stylelint-config-recommended-vue'],
  14 + },
  15 + {
  16 + files: ['*.scss', '**/*.scss'],
  17 + customSyntax: 'postcss-scss',
  18 + extends: ['stylelint-config-standard-scss', 'stylelint-config-recommended-vue/scss'],
  19 + rule: {
  20 + 'scss/percent-placeholder-pattern': null,
  21 + },
  22 + },
  23 + ],
  24 + rules: {
  25 + 'function-no-unknown': null,
  26 + 'selector-class-pattern': null,
  27 + 'selector-pseudo-class-no-unknown': [
  28 + true,
  29 + {
  30 + ignorePseudoClasses: ['global', 'deep'],
  31 + },
  32 + ],
  33 + 'selector-pseudo-element-no-unknown': [
  34 + true,
  35 + {
  36 + ignorePseudoElements: ['v-deep'],
  37 + },
  38 + ],
  39 + 'at-rule-no-unknown': [
  40 + true,
  41 + {
  42 + ignoreAtRules: [
  43 + 'tailwind',
  44 + 'apply',
  45 + 'variants',
  46 + 'responsive',
  47 + 'screen',
  48 + 'function',
  49 + 'if',
  50 + 'each',
  51 + 'include',
  52 + 'mixin',
  53 + 'extend',
  54 + ],
  55 + },
  56 + ],
  57 + 'no-empty-source': null,
  58 + 'string-quotes': null,
  59 + 'named-grid-areas-no-invalid': null,
  60 + 'no-descending-specificity': null,
  61 + 'font-family-no-missing-generic-family-keyword': null,
  62 + 'rule-empty-line-before': [
  63 + 'always',
  64 + {
  65 + ignore: ['after-comment', 'first-nested'],
  66 + },
  67 + ],
  68 + 'unit-no-unknown': [true, { ignoreUnits: ['rpx'] }],
  69 + 'order/order': [
  70 + [
  71 + 'dollar-variables',
  72 + 'custom-properties',
  73 + 'at-rules',
  74 + 'declarations',
  75 + {
  76 + type: 'at-rule',
  77 + name: 'supports',
  78 + },
  79 + {
  80 + type: 'at-rule',
  81 + name: 'media',
  82 + },
  83 + 'rules',
  84 + ],
  85 + { severity: 'error' },
  86 + ],
  87 + },
  88 + ignoreFiles: ['**/*.js', '**/*.jsx', '**/*.tsx', '**/*.ts'],
  89 +};
... ...
internal/ts-config/package.json 0 โ†’ 100644
  1 +{
  2 + "name": "@vben/ts-config",
  3 + "version": "1.0.0",
  4 + "private": true,
  5 + "license": "MIT",
  6 + "devDependencies": {}
  7 +}
... ...
package.json
... ... @@ -16,36 +16,36 @@
16 16 "url": "https://github.com/anncwb"
17 17 },
18 18 "scripts": {
19   - "commit": "czg",
20 19 "bootstrap": "pnpm install",
21   - "serve": "npm run dev",
22   - "dev": "vite",
23 20 "build": "cross-env NODE_ENV=production vite build && esno ./build/script/postBuild.ts",
24   - "build:test": "cross-env vite build --mode test && esno ./build/script/postBuild.ts",
25 21 "build:no-cache": "pnpm clean:cache && npm run build",
26   - "report": "cross-env REPORT=true npm run build",
27   - "type:check": "vue-tsc --noEmit --skipLibCheck",
28   - "preview": "npm run build && vite preview",
29   - "preview:dist": "vite preview",
30   - "log": "conventional-changelog -p angular -i CHANGELOG.md -s",
  22 + "build:test": "cross-env vite build --mode test && esno ./build/script/postBuild.ts",
31 23 "clean:cache": "rimraf node_modules/.cache/ && rimraf node_modules/.vite",
32 24 "clean:lib": "rimraf node_modules",
  25 + "commit": "czg",
  26 + "dev": "vite",
  27 + "gen:icon": "esno ./build/generate/icon/index.ts",
  28 + "preinstall": "npx only-allow pnpm",
  29 + "postinstall": "turbo run stub",
33 30 "lint:eslint": "eslint --cache --max-warnings 0 \"{src,mock}/**/*.{vue,ts,tsx}\" --fix",
34 31 "lint:prettier": "prettier --write \"src/**/*.{js,json,tsx,css,less,scss,vue,html,md}\"",
35   - "lint:stylelint": "stylelint --cache --fix \"**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/",
36   - "lint:lint-staged": "lint-staged",
37   - "test:unit": "jest",
38   - "test:gzip": "npx http-server dist --cors --gzip -c-1",
39   - "test:br": "npx http-server dist --cors --brotli -c-1",
40   - "reinstall": "rimraf pnpm-lock.yaml && rimraf package.lock.json && rimraf node_modules && npm run bootstrap",
41   - "preinstall": "npx only-allow pnpm",
  32 + "lint:stylelint": "stylelint \"**/*.{vue,css,less.scss}\" --fix --cache --cache-location node_modules/.cache/stylelint/",
  33 + "log": "conventional-changelog -p angular -i CHANGELOG.md -s",
42 34 "prepare": "husky install",
43   - "gen:icon": "esno ./build/generate/icon/index.ts"
  35 + "preview": "npm run build && vite preview",
  36 + "preview:dist": "vite preview",
  37 + "reinstall": "rimraf pnpm-lock.yaml && rimraf package.lock.json && rimraf node_modules && npm run bootstrap",
  38 + "report": "cross-env REPORT=true npm run build",
  39 + "serve": "npm run dev",
  40 + "test:br": "npx http-server dist --cors --brotli -c-1",
  41 + "test:gzip": "npx http-server dist --cors --gzip -c-1",
  42 + "test:unit": "jest",
  43 + "type:check": "vue-tsc --noEmit --skipLibCheck"
44 44 },
45 45 "lint-staged": {
46 46 "*.{js,jsx,ts,tsx}": [
47   - "eslint --fix",
48   - "prettier --write"
  47 + "prettier --write",
  48 + "eslint --fix"
49 49 ],
50 50 "{!(package)*.json,*.code-snippets,.!(browserslist)*rc}": [
51 51 "prettier --write--parser json"
... ... @@ -54,13 +54,13 @@
54 54 "prettier --write"
55 55 ],
56 56 "*.vue": [
57   - "eslint --fix",
58 57 "prettier --write",
  58 + "eslint --fix",
59 59 "stylelint --fix"
60 60 ],
61 61 "*.{scss,less,styl,html}": [
62   - "stylelint --fix",
63   - "prettier --write"
  62 + "prettier --write",
  63 + "stylelint --fix"
64 64 ],
65 65 "*.md": [
66 66 "prettier --write"
... ... @@ -133,8 +133,8 @@
133 133 "@types/qs": "^6.9.7",
134 134 "@types/showdown": "^2.0.0",
135 135 "@types/sortablejs": "^1.15.1",
136   - "@typescript-eslint/eslint-plugin": "^5.57.0",
137   - "@typescript-eslint/parser": "^5.57.0",
  136 + "@vben/eslint-config": "workspace:*",
  137 + "@vben/stylelint-config": "workspace:*",
138 138 "@vitejs/plugin-vue": "^4.1.0",
139 139 "@vitejs/plugin-vue-jsx": "^3.0.1",
140 140 "@vue/compiler-sfc": "^3.2.47",
... ... @@ -145,31 +145,24 @@
145 145 "cz-git": "^1.6.1",
146 146 "czg": "^1.6.1",
147 147 "dotenv": "^16.0.3",
148   - "eslint": "^8.37.0",
149   - "eslint-config-prettier": "^8.8.0",
150   - "eslint-plugin-prettier": "^4.2.1",
151   - "eslint-plugin-vue": "^9.10.0",
152 148 "esno": "^0.16.3",
153 149 "fs-extra": "^11.1.1",
154 150 "husky": "^8.0.3",
155 151 "inquirer": "^9.1.5",
156 152 "less": "^4.1.3",
157 153 "lint-staged": "13.2.0",
158   - "npm-run-all": "^4.1.5",
159 154 "picocolors": "^1.0.0",
160 155 "postcss": "^8.4.21",
161 156 "postcss-html": "^1.5.0",
162 157 "postcss-less": "^6.0.0",
163 158 "prettier": "^2.8.7",
  159 + "prettier-plugin-packagejson": "^2.4.3",
164 160 "rimraf": "^4.4.1",
165 161 "rollup-plugin-visualizer": "^5.9.0",
166 162 "sass": "^1.60.0",
167   - "stylelint": "^15.4.0",
168   - "stylelint-config-recommended": "^11.0.0",
169   - "stylelint-config-recommended-vue": "^1.4.0",
170   - "stylelint-config-standard": "^32.0.0",
171   - "stylelint-order": "^6.0.3",
  163 + "turbo": "^1.8.8",
172 164 "typescript": "^5.0.3",
  165 + "unbuild": "^1.2.0",
173 166 "vite": "^4.3.0-beta.1",
174 167 "vite-plugin-compression": "^0.5.1",
175 168 "vite-plugin-html": "^3.2.0",
... ... @@ -177,7 +170,6 @@
177 170 "vite-plugin-purge-icons": "^0.9.2",
178 171 "vite-plugin-svg-icons": "^2.0.1",
179 172 "vite-plugin-windicss": "^1.8.10",
180   - "vue-eslint-parser": "^9.1.1",
181 173 "vue-tsc": "^1.2.0"
182 174 },
183 175 "packageManager": "pnpm@8.1.0",
... ...