settings.json 7.83 KB
{
	"tailwindCSS.experimental.configFile": "internal/tailwind-config/src/index.ts",
	"eslint.nodePath": "./node_modules",
	// 告诉 ESLint:这是一个 monorepo
	"eslint.workingDirectories": [{ "mode": "auto" }],
	// 使用 flat config(ESLint v9+ 必需)
	"eslint.useFlatConfig": true,
	"eslint.useESLintClass": true,
	// workbench
	"workbench.list.smoothScrolling": true,
	"workbench.startupEditor": "newUntitledFile",
	"workbench.tree.indent": 24,
	"workbench.editor.highlightModifiedTabs": true,
	"workbench.editor.closeOnFileDelete": true,
	"workbench.editor.limit.enabled": true,
	"workbench.editor.limit.perEditorGroup": true,
	"workbench.editor.limit.value": 5,

	// editor
	"editor.tabSize": 4,
	"editor.detectIndentation": false,
	"editor.insertSpaces": false,
	"editor.cursorBlinking": "expand",
	"editor.largeFileOptimizations": true,
	"editor.accessibilitySupport": "off",
	"editor.cursorSmoothCaretAnimation": "on",
	"editor.guides.bracketPairs": "active",
	"editor.inlineSuggest.enabled": true,
	"editor.suggestSelection": "recentlyUsedByPrefix",
	"editor.acceptSuggestionOnEnter": "smart",
	"editor.suggest.snippetsPreventQuickSuggestions": false,
	"editor.stickyScroll.enabled": true,
	"editor.hover.sticky": true,
	"editor.suggest.insertMode": "replace",
	"editor.bracketPairColorization.enabled": true,
	"editor.autoClosingBrackets": "beforeWhitespace",
	"editor.autoClosingDelete": "always",
	"editor.autoClosingOvertype": "always",
	"editor.autoClosingQuotes": "beforeWhitespace",
	"editor.wordSeparators": "`~!@#%^&*()=+[{]}\\|;:'\",.<>/?",
	"editor.codeActionsOnSave": {
		"source.fixAll.eslint": "always",
		"source.fixAll.stylelint": "always",
	},
	"editor.defaultFormatter": "dbaeumer.vscode-eslint",
	"[html]": {
		"editor.defaultFormatter": "dbaeumer.vscode-eslint"
	},
	"[css]": {
		"editor.defaultFormatter": "esbenp.prettier-vscode"
	},
	"[wxss]": {
		"editor.defaultFormatter": "esbenp.prettier-vscode"
	},
	"[scss]": {
		"editor.defaultFormatter": "esbenp.prettier-vscode"
	},
	"[less]": {
		"editor.defaultFormatter": "esbenp.prettier-vscode"
	},
	"[javascript]": {
		"editor.defaultFormatter": "dbaeumer.vscode-eslint"
	},
	"[typescript]": {
		"editor.defaultFormatter": "dbaeumer.vscode-eslint"
	},
	"[markdown]": {
		"editor.defaultFormatter": "dbaeumer.vscode-eslint"
	},
	"[jsonc]": {
		"editor.defaultFormatter": "dbaeumer.vscode-eslint"
	},
	"[vue]": {
		"editor.defaultFormatter": "dbaeumer.vscode-eslint"
	},
	"[wxml]": {
		"editor.defaultFormatter": "esbenp.prettier-vscode"
	},
	"[json]": {
		"editor.defaultFormatter": "esbenp.prettier-vscode"
	},
	"[yaml]": {
		"editor.defaultFormatter": "esbenp.prettier-vscode"
	},
	"[uts]": {
		"editor.defaultFormatter": "dbaeumer.vscode-eslint"
	},
	"[uvue]": {
		"editor.defaultFormatter": "dbaeumer.vscode-eslint"
	},
	// extensions
	"extensions.ignoreRecommendations": true,

	// terminal
	"terminal.integrated.cursorBlinking": true,
	"terminal.integrated.persistentSessionReviveProcess": "never",
	"terminal.integrated.tabs.enabled": true,
	"terminal.integrated.scrollback": 10000,
	"terminal.integrated.stickyScroll.enabled": true,
	"vls.ext.default.style": "scss",
	"emmet.includeLanguages": {
		"vue": "html",
		"uvue": "html"
  	},
	// files
	"files.eol": "\n",
	"files.insertFinalNewline": true,
	"files.simpleDialog.enable": true,
	"files.associations": {
		"*.uts": "typescript",
		"*.ejs": "html",
		"*.art": "html",
		"**/tsconfig.json": "jsonc",
		"*.json": "jsonc",
		"package.json": "json"
	},

	"files.exclude": {
		"**/.eslintcache": true,
		"**/bower_components": true,
		"**/.turbo": true,
		"**/.idea": true,
		"**/.vitepress": false,
		"**/tmp": true,
		"**/.git": true,
		"**/.svn": true,
		"**/.hg": true,
		"**/CVS": true,
		"**/.stylelintcache": true,
		"**/.DS_Store": true,
		"**/vite.config.mts.*": false,
		"**/tea.yaml": true
	},
	"files.watcherExclude": {
		"**/.git/objects/**": true,
		"**/.git/subtree-cache/**": true,
		"**/.vscode/**": true,
		"**/node_modules/**": true,
		"**/uni_modules/**": true,
		"**/miniprogram_npm/**": true,
		"**/tmp/**": true,
		"**/bower_components/**": true,
		"**/dist/**": true,
		"**/yarn.lock": true
	},

	"typescript.tsserver.exclude": ["**/node_modules", "**/dist", "**/.turbo", "**/uni_modules", "**/miniprogram_npm"],

	// search
	"search.searchEditor.singleClickBehaviour": "peekDefinition",
	"search.followSymlinks": false,
	// 在使用搜索功能时,将这些文件夹/文件排除在外
	"search.exclude": {
		"**/uni_modules": true,
		"**/miniprogram_npm": true,
		"**/node_modules": true,
		"**/*.log": true,
		"**/*.log*": true,
		"**/bower_components": true,
		"**/dist": true,
		"**/elehukouben": true,
		"**/.git": true,
		"**/.github": true,
		"**/.gitignore": true,
		"**/.svn": true,
		"**/.DS_Store": true,
		"**/.vitepress/cache": true,
		"**/.idea": true,
		"**/.vscode": false,
		"**/.yarn": true,
		"**/tmp": true,
		"*.xml": true,
		"out": true,
		"dist": true,
		"node_modules": true,
		"CHANGELOG.md": true,
		"**/pnpm-lock.yaml": true,
		"**/yarn.lock": true
	},

	"debug.onTaskErrors": "debugAnyway",
	"diffEditor.ignoreTrimWhitespace": false,
	"npm.packageManager": "pnpm",

	"css.validate": false,
	"less.validate": false,
	"scss.validate": false,

	// extension
	"emmet.showSuggestionsAsSnippets": true,
	"emmet.triggerExpansionOnTab": false,

	"errorLens.enabledDiagnosticLevels": ["warning", "error"],
	"errorLens.excludeBySource": ["cSpell", "Grammarly", "eslint"],

	"stylelint.enable": true,
	"stylelint.packageManager": "pnpm",
	"stylelint.validate": ["css", "less", "postcss", "scss", "vue", "wxss"],
	"stylelint.snippet": ["css", "less", "postcss", "scss", "vue", "wxss"],
	"stylelint.reportInvalidScopeDisables": true,
	"stylelint.reportNeedlessDisables": true,
	"stylelint.runtimeEnvironment": "node",

	"typescript.inlayHints.enumMemberValues.enabled": true,
	"typescript.preferences.preferTypeOnlyAutoImports": true,
	"typescript.preferences.includePackageJsonAutoImports": "on",

	"eslint.validate": [
		"javascript",
		"typescript",
		"javascriptreact",
		"typescriptreact",
		"uts",
		"uvue",
		"vue",
		"html",
		"markdown",
		"json",
		"jsonc",
		"json5",
		"wxml"
	],

	"eslint.format.enable": true,

	"tailwindCSS.experimental.classRegex": [["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"]],

	"github.copilot.enable": {
		"*": true,
		"markdown": true,
		"plaintext": false,
		"yaml": false
	},

	"cssVariables.lookupFiles": ["packages/core/base/design/src/**/*.css"],

	"i18n-ally.localesPaths": [
		"packages/locales/src/langs",
		"playground/src/locales/langs",
		"apps/*/src/locales/langs"
	],
	"i18n-ally.pathMatcher": "{locale}/{namespace}.{ext}",
	"i18n-ally.enabledParsers": ["json"],
	"i18n-ally.sourceLanguage": "en",
	"i18n-ally.displayLanguage": "zh-CN",
	"i18n-ally.enabledFrameworks": ["vue", "react"],
	"i18n-ally.keystyle": "nested",
	"i18n-ally.sortKeys": true,
	"i18n-ally.namespace": true,

	// 控制相关文件嵌套展示
	"explorer.fileNesting.enabled": true,
	"explorer.fileNesting.expand": false,
	"explorer.fileNesting.patterns": {
		"*.ts": "$(capture).test.ts, $(capture).test.tsx, $(capture).spec.ts, $(capture).spec.tsx, $(capture).d.ts",
		"*.tsx": "$(capture).test.ts, $(capture).test.tsx, $(capture).spec.ts, $(capture).spec.tsx,$(capture).d.ts",
		"*.env": "$(capture).env.*",
		"package.json": "pnpm-lock.yaml,pnpm-workspace.yaml,.npmrc,.browserslistrc,.node-version,.tazerc.json",
		"eslint.config.mjs": ".editorconfig,.eslintignore,.prettierignore,.stylelintignore,.commitlintrc.*,.prettierrc.*,stylelint.config.*,.lintstagedrc.mjs,cspell.json",
		".gitignore": ".gitconfig,.gitattributes",
		"tailwind.config.mjs": "postcss.*"
	},
	"scm.repositories.visible": 0,
	"commentTranslate.hover.enabled": false,
	"commentTranslate.multiLineMerge": true,
	"vue.server.hybridMode": true,
	"typescript.tsdk": "node_modules/typescript/lib",
	"oxc.enable": false,
	"cSpell.words": ["archiver", "axios", "dotenv", "isequal", "jspm", "napi", "nolebase", "rollup", "vitest"]
}