Skip to content

Commit e589848

Browse files
Merge pull request #1 from Little-LittleProgrammer/feature/1.1.2
Feature/1.1.2
2 parents c7fc51b + f975b59 commit e589848

Some content is hidden

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

86 files changed

+8770
-5082
lines changed

.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: ['@q-front-npm-configs/commitlint']
3+
}

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ module.exports = {
22
root: true,
33
// This tells ESLint to load the config from the package `eslint-config-custom`
44
extends: require.resolve('@quantum-design-configs/eslint/eslint-base.js'),
5+
ignorePatterns: ['*.json', '*.yaml', '*.md']
56
};

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ yarn-error.log*
4040

4141
# turbo
4242
.turbo
43-
.vscode
4443

4544
# custom
4645
*-cache
@@ -61,4 +60,4 @@ cache
6160
.nitro
6261
.cache
6362

64-
.VSCodeCounter/**
63+
.VSCodeCounter/**

.lintstagedrc.mjs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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)*rc}': [
15+
'prettier --cache --write--parser json',
16+
],
17+
'package.json': ['prettier --cache --write'],
18+
};

.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: 200, // 此长度跟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: 227 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,228 @@
11
{
2-
"eslint.workingDirectories": [
3-
{
4-
"mode": "auto"
5-
}
6-
]
7-
}
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+

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
clean:
3+
find . -name 'node_modules' -type d -prune -exec rm -rf '{}' +
4+
find . -name 'dist' -type d -prune -exec rm -rf '{}' +
5+
find . -name '.turbo' -type d -prune -exec rm -rf '{}' +
6+
find . -name '.output' -type d -prune -exec rm -rf '{}' +
7+
find . -name '.nuxt' -type d -prune -exec rm -rf '{}' +
8+
9+
install:
10+
pnpm install
11+
pnpm store prune

apps/playground/components.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/* eslint-disable */
2-
/* prettier-ignore */
32
// @ts-nocheck
43
// Generated by unplugin-vue-components
54
// Read more: https://github.com/vuejs/core/pull/3399
65
export {}
76

7+
/* prettier-ignore */
88
declare module 'vue' {
99
export interface GlobalComponents {
1010
CompList: typeof import('./src/components/classic/sidebar/comp-list/index.vue')['default']
@@ -19,14 +19,14 @@ declare module 'vue' {
1919
QAntdSetting: typeof import('@quantum-design/vue3-antd-pc-ui/es')['QAntdSetting']
2020
QAntdTable: typeof import('@quantum-design/vue3-antd-pc-ui/es')['QAntdTable']
2121
QAntdTableAction: typeof import('@quantum-design/vue3-antd-pc-ui/es')['QAntdTableAction']
22+
QAntdThemeModeButton: typeof import('@quantum-design/vue3-antd-pc-ui/es')['QAntdThemeModeButton']
2223
QBreadcrumb: typeof import('@quantum-design/vue3-pc-ui/es')['QBreadcrumb']
2324
QCodeEditor: typeof import('@quantum-design/vue3-pc-ui/es')['QCodeEditor']
2425
QLoading: typeof import('@quantum-design/vue3-pc-ui/es')['QLoading']
2526
QmAside: typeof import('./src/components/layout/qm-aside.vue')['default']
2627
QmAuthority: typeof import('./src/components/qm-authority/index.vue')['default']
2728
QmHeader: typeof import('./src/components/layout/qm-header.vue')['default']
2829
QmReloadPrompt: typeof import('./src/components/layout/qm-reload-prompt.vue')['default']
29-
QThemeModeButton: typeof import('@quantum-design/vue3-pc-ui/es')['QThemeModeButton']
3030
RouterLink: typeof import('vue-router')['RouterLink']
3131
RouterView: typeof import('vue-router')['RouterView']
3232
Sidebar: typeof import('./src/components/classic/sidebar/index.vue')['default']

apps/playground/config/antd.ts

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
import fs from 'fs';
22
import path from 'path';
33
// 获取base.scss文件
4-
const antdCssStrTemp = (fs.readFileSync(path.resolve('node_modules/@quantum-design/shared/style/antd/base.scss'), 'utf-8').toString().split('// antdend')[0].match(/\$(.*);/g) || []).join(',').replace(/;,/g, '",').replace(/;/g, '"').replace(/: /g, '": "').replace(/\$/g, '"');
4+
const antdCssStrTemp = (
5+
fs
6+
.readFileSync(path.resolve('node_modules/@quantum-design/styles/base/base.scss'), 'utf-8')
7+
.toString()
8+
.split('// antdend')[0]
9+
.match(/\$(.*);/g) || []
10+
)
11+
.join(',')
12+
.replace(/;,/g, '",')
13+
.replace(/;/g, '"')
14+
.replace(/: /g, '": "')
15+
.replace(/\$/g, '"');
516
const antdCssData = JSON.parse('{' + antdCssStrTemp + '}');
617

7-
const baseScssFile = "@import '@quantum-design/shared/style/base/base.scss'; @import '@quantum-design/shared/style/base/mixin.scss';";
18+
const baseScssFile = "@use '@quantum-design/styles/base/base.scss' as *; @use '@quantum-design/styles/base/mixin.scss' as *;";
819

9-
export {
10-
antdCssStrTemp,
11-
antdCssData,
12-
baseScssFile
13-
};
20+
export { antdCssStrTemp, antdCssData, baseScssFile };

0 commit comments

Comments
 (0)