Skip to content

Commit 0b57e87

Browse files
feat: 更新项目依赖至 2.0.0 版本 (#1)
- 更新 changeset 配置到 3.0.2 版本 - 添加完整的开发工具链配置 (husky, commitlint, prettier) - 优化 monorepo 依赖管理配置 - 新增 playground-nuxt 应用 - 完善 VSCode 工作区配置
1 parent 67ff9a2 commit 0b57e87

File tree

563 files changed

+104869
-20050
lines changed

Some content is hidden

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

563 files changed

+104869
-20050
lines changed

.changeset/config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json",
2+
"$schema": "https://unpkg.com/@changesets/config@3.0.2/schema.json",
33
"changelog": "@changesets/cli/changelog",
44
"commit": false,
55
"fixed": [],
66
"linked": [],
77
"access": "restricted",
88
"baseBranch": "main",
99
"updateInternalDependencies": "patch",
10-
"ignore": ["project-docs", "playground", "@quantum-design/polyfill"]
10+
"ignore": ["project-docs", "playground", "@quantum-design/polyfill", "create-quantum-app"]
1111
}

.commitlintrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
extends: ['@quantum-design-configs/commitlint']
3+
}

.gitignore

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,10 @@ yarn-error.log*
3838

3939
# turbo
4040
.turbo
41-
.vscode
42-
4341
# custom
4442
*-cache
4543
**/stats.html
44+
.eslintcache
4645

4746
# vite
4847
vite.config.ts.*
@@ -57,4 +56,7 @@ cache
5756
.data
5857
.nuxt
5958
.nitro
60-
.cache
59+
.cache
60+
61+
# cursor
62+
.cursor/mcp.json

.husky/commit-msg

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
echo Start running commit-msg hook...
2+
3+
# Check whether the git commit information is standardized
4+
pnpm exec commitlint --edit "$1"
5+
6+
echo Run commit-msg hook done.

.husky/post-merge

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# 每次 git pull 之后, 安装依赖
2+
3+
<!-- pnpm install -->

.husky/pre-commit

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# update `.vscode/vben-admin.code-workspace` file
2+
# pnpm vsh code-workspace --auto-commit
3+
4+
# Format and submit code according to lintstagedrc.js configuration
5+
pnpm exec lint-staged
6+
7+
echo Run pre-commit hook done.

.lintstagedrc.mjs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
export default {
2+
'*.{js,jsx,ts,tsx}': [
3+
// 'prettier --cache --ignore-unknown --write',
4+
'eslint --cache --fix',
5+
],
6+
'*.{scss,less,styl,html,vue,css}': [
7+
'prettier --cache --ignore-unknown --write',
8+
],
9+
'*.md': ['prettier --cache --ignore-unknown --write'],
10+
'*.vue': [
11+
// 'prettier --write',
12+
'eslint --cache --fix',
13+
],
14+
'{!(package)*.json,*.code-snippets,.!(browserslist|npm)*rc}': [
15+
'prettier --cache --write--parser json',
16+
],
17+
'package.json': ['prettier --cache --write'],
18+
};
19+

.npmrc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,15 @@ SENTRYCLI_CDNURL=https://cdn.npmmirror.com/binaries/sentry-cli
44
sharp_libvips_binary_host=https://npmmirror.com/mirrors/sharp-libvips
55
sharp_binary_host=https://npmmirror.com/mirrors/sharp
66
home=https://www.npmjs.org
7+
public-hoist-pattern[]=husky
8+
public-hoist-pattern[]=eslint
9+
public-hoist-pattern[]=prettier
10+
public-hoist-pattern[]=prettier-plugin-tailwindcss
11+
public-hoist-pattern[]=stylelint
12+
public-hoist-pattern[]=@commitlint/*
13+
public-hoist-pattern[]=czg
14+
public-hoist-pattern[]=@eslint/*
15+
public-hoist-pattern[]=eslint-plugin-vue
16+
public-hoist-pattern[]=eslint-config-turbo
17+
public-hoist-pattern[]=@typescript-eslint/eslint-plugin
18+
public-hoist-pattern[]=@typescript-eslint/parser

.prettierrc.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
printWidth: 500, // 此长度跟eslint 'max-len': [2, 500], 保持一致
3+
tabWidth: 4,
4+
semi: true,
5+
singleQuote: true,
6+
trailingComma: 'all',
7+
arrowParens: 'always',
8+
};

.vscode/settings.json

Lines changed: 228 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,228 @@
1+
{
2+
"tailwindCSS.experimental.configFile": "internal/tailwind-config/src/index.ts",
3+
// workbench
4+
"workbench.list.smoothScrolling": true,
5+
"workbench.startupEditor": "newUntitledFile",
6+
"workbench.tree.indent": 10,
7+
"workbench.editor.highlightModifiedTabs": true,
8+
"workbench.editor.closeOnFileDelete": true,
9+
"workbench.editor.limit.enabled": true,
10+
"workbench.editor.limit.perEditorGroup": true,
11+
"workbench.editor.limit.value": 5,
12+
13+
// editor
14+
"editor.tabSize": 4,
15+
"editor.detectIndentation": false,
16+
"editor.cursorBlinking": "expand",
17+
"editor.largeFileOptimizations": false,
18+
"editor.accessibilitySupport": "off",
19+
"editor.cursorSmoothCaretAnimation": "on",
20+
"editor.guides.bracketPairs": "active",
21+
"editor.inlineSuggest.enabled": true,
22+
"editor.suggestSelection": "recentlyUsedByPrefix",
23+
"editor.acceptSuggestionOnEnter": "smart",
24+
"editor.suggest.snippetsPreventQuickSuggestions": false,
25+
"editor.stickyScroll.enabled": true,
26+
"editor.hover.sticky": true,
27+
"editor.suggest.insertMode": "replace",
28+
"editor.bracketPairColorization.enabled": true,
29+
"editor.autoClosingBrackets": "beforeWhitespace",
30+
"editor.autoClosingDelete": "always",
31+
"editor.autoClosingOvertype": "always",
32+
"editor.autoClosingQuotes": "beforeWhitespace",
33+
"editor.wordSeparators": "`~!@#%^&*()=+[{]}\\|;:'\",.<>/?",
34+
"editor.codeActionsOnSave": {
35+
"source.fixAll.eslint": "explicit",
36+
"source.fixAll.stylelint": "explicit",
37+
"source.organizeImports": "never"
38+
},
39+
"editor.defaultFormatter": "esbenp.prettier-vscode",
40+
"[html]": {
41+
"editor.defaultFormatter": "esbenp.prettier-vscode"
42+
},
43+
"[css]": {
44+
"editor.defaultFormatter": "esbenp.prettier-vscode"
45+
},
46+
"[scss]": {
47+
"editor.defaultFormatter": "esbenp.prettier-vscode"
48+
},
49+
"[javascript]": {
50+
"editor.defaultFormatter": "esbenp.prettier-vscode"
51+
},
52+
"[typescript]": {
53+
"editor.defaultFormatter": "esbenp.prettier-vscode"
54+
},
55+
"[json]": {
56+
"editor.defaultFormatter": "esbenp.prettier-vscode"
57+
},
58+
"[markdown]": {
59+
"editor.defaultFormatter": "esbenp.prettier-vscode"
60+
},
61+
"[jsonc]": {
62+
"editor.defaultFormatter": "esbenp.prettier-vscode"
63+
},
64+
"[vue]": {
65+
"editor.defaultFormatter": "esbenp.prettier-vscode"
66+
},
67+
// extensions
68+
"extensions.ignoreRecommendations": true,
69+
70+
// terminal
71+
"terminal.integrated.cursorBlinking": true,
72+
"terminal.integrated.persistentSessionReviveProcess": "never",
73+
"terminal.integrated.tabs.enabled": true,
74+
"terminal.integrated.scrollback": 10000,
75+
"terminal.integrated.stickyScroll.enabled": true,
76+
77+
// files
78+
"files.eol": "\n",
79+
"files.insertFinalNewline": true,
80+
"files.simpleDialog.enable": true,
81+
"files.associations": {
82+
"*.ejs": "html",
83+
"*.art": "html",
84+
"**/tsconfig.json": "jsonc",
85+
"*.json": "jsonc",
86+
"package.json": "json"
87+
},
88+
89+
"files.exclude": {
90+
"**/.eslintcache": true,
91+
"**/bower_components": true,
92+
"**/.turbo": true,
93+
"**/.idea": true,
94+
"**/tmp": true,
95+
"**/.git": true,
96+
"**/.svn": true,
97+
"**/.hg": true,
98+
"**/CVS": true,
99+
"**/.stylelintcache": true,
100+
"**/.DS_Store": true,
101+
"**/vite.config.mts.*": true,
102+
"**/tea.yaml": true
103+
},
104+
"files.watcherExclude": {
105+
"**/.git/objects/**": true,
106+
"**/.git/subtree-cache/**": true,
107+
"**/.vscode/**": true,
108+
"**/node_modules/**": true,
109+
"**/tmp/**": true,
110+
"**/bower_components/**": true,
111+
"**/dist/**": true,
112+
"**/yarn.lock": true
113+
},
114+
115+
// search
116+
"search.searchEditor.singleClickBehaviour": "peekDefinition",
117+
"search.followSymlinks": false,
118+
// 在使用搜索功能时,将这些文件夹/文件排除在外
119+
"search.exclude": {
120+
"**/node_modules": true,
121+
"**/*.log": true,
122+
"**/*.log*": true,
123+
"**/bower_components": true,
124+
"**/dist": true,
125+
"**/elehukouben": true,
126+
"**/.git": true,
127+
"**/.github": true,
128+
"**/.gitignore": true,
129+
"**/.svn": true,
130+
"**/.DS_Store": true,
131+
"**/.vitepress/cache": true,
132+
"**/.idea": true,
133+
"**/.vscode": false,
134+
"**/.yarn": true,
135+
"**/tmp": true,
136+
"*.xml": true,
137+
"out": true,
138+
"dist": true,
139+
"node_modules": true,
140+
"CHANGELOG.md": true,
141+
"**/pnpm-lock.yaml": true,
142+
"**/yarn.lock": true
143+
},
144+
145+
"debug.onTaskErrors": "debugAnyway",
146+
"diffEditor.ignoreTrimWhitespace": false,
147+
"npm.packageManager": "pnpm",
148+
149+
"css.validate": false,
150+
"less.validate": false,
151+
"scss.validate": false,
152+
153+
// extension
154+
"emmet.showSuggestionsAsSnippets": true,
155+
"emmet.triggerExpansionOnTab": false,
156+
157+
"errorLens.enabledDiagnosticLevels": ["warning", "error"],
158+
"errorLens.excludeBySource": ["cSpell", "Grammarly", "eslint"],
159+
160+
"stylelint.enable": true,
161+
"stylelint.packageManager": "pnpm",
162+
"stylelint.validate": ["css", "less", "postcss", "scss", "vue"],
163+
"stylelint.customSyntax": "postcss-html",
164+
"stylelint.snippet": ["css", "less", "postcss", "scss", "vue"],
165+
166+
"typescript.inlayHints.enumMemberValues.enabled": true,
167+
"typescript.preferences.preferTypeOnlyAutoImports": true,
168+
"typescript.preferences.includePackageJsonAutoImports": "on",
169+
170+
"eslint.validate": [
171+
"javascript",
172+
"typescript",
173+
"javascriptreact",
174+
"typescriptreact",
175+
"vue",
176+
"html",
177+
"markdown",
178+
"json",
179+
"jsonc",
180+
"json5"
181+
],
182+
183+
"tailwindCSS.experimental.classRegex": [
184+
["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"]
185+
],
186+
187+
"github.copilot.enable": {
188+
"*": true,
189+
"markdown": true,
190+
"plaintext": false,
191+
"yaml": false
192+
},
193+
194+
"cssVariables.lookupFiles": ["packages/core/base/design/src/**/*.css"],
195+
196+
"i18n-ally.localesPaths": [
197+
"packages/locales/src/langs",
198+
"playground/src/locales/langs",
199+
"apps/*/src/locales/langs"
200+
],
201+
"i18n-ally.pathMatcher": "{locale}/{namespace}.{ext}",
202+
"i18n-ally.enabledParsers": ["json"],
203+
"i18n-ally.sourceLanguage": "en",
204+
"i18n-ally.displayLanguage": "zh-CN",
205+
"i18n-ally.enabledFrameworks": ["vue", "react"],
206+
"i18n-ally.keystyle": "nested",
207+
"i18n-ally.sortKeys": true,
208+
"i18n-ally.namespace": true,
209+
210+
// 控制相关文件嵌套展示
211+
"explorer.fileNesting.enabled": true,
212+
"explorer.fileNesting.expand": false,
213+
"explorer.fileNesting.patterns": {
214+
"*.ts": "$(capture).test.ts, $(capture).test.tsx, $(capture).spec.ts, $(capture).spec.tsx, $(capture).d.ts",
215+
"*.tsx": "$(capture).test.ts, $(capture).test.tsx, $(capture).spec.ts, $(capture).spec.tsx,$(capture).d.ts",
216+
"*.env": "$(capture).env.*",
217+
"README.md": "README*,CHANGELOG*,LICENSE,CNAME",
218+
"package.json": "pnpm-lock.yaml,pnpm-workspace.yaml,.gitattributes,.gitignore,.gitpod.yml,.npmrc,.browserslistrc,.node-version,.git*,.tazerc.json",
219+
"eslint.config.mjs": ".eslintignore,.prettierignore,.stylelintignore,.commitlintrc.*,.prettierrc.*,stylelint.config.*,.lintstagedrc.mjs,cspell.json",
220+
".eslintrc.js": ".eslintignore,.prettierignore,.stylelintignore,.commitlintrc.*,.prettierrc.*,stylelint.config.*,.lintstagedrc.mjs,cspell.json",
221+
"tailwind.config.mjs": "postcss.*"
222+
},
223+
"commentTranslate.hover.enabled": false,
224+
"commentTranslate.multiLineMerge": true,
225+
"vue.server.hybridMode": true,
226+
"typescript.tsdk": "node_modules/typescript/lib"
227+
}
228+

0 commit comments

Comments
 (0)