mirror of
https://gitee.com/ByteDance/flowgram.ai.git
synced 2025-07-07 17:43:29 +08:00
fix: eslint format on save (#177)
This commit is contained in:
parent
02a70f4b48
commit
f98f44cbc9
2
.vscode/extentions.json
vendored
2
.vscode/extentions.json
vendored
@ -1,6 +1,8 @@
|
|||||||
{
|
{
|
||||||
"recommendations": [
|
"recommendations": [
|
||||||
|
"styled-components.vscode-styled-components",
|
||||||
"editorconfig.editorconfig",
|
"editorconfig.editorconfig",
|
||||||
|
"dbaeumer.vscode-eslint",
|
||||||
"esbenp.prettier-vscode",
|
"esbenp.prettier-vscode",
|
||||||
"streetsidesoftware.code-spell-checker",
|
"streetsidesoftware.code-spell-checker",
|
||||||
"codezombiech.gitignore",
|
"codezombiech.gitignore",
|
||||||
|
|||||||
87
.vscode/settings.json
vendored
87
.vscode/settings.json
vendored
@ -6,17 +6,11 @@
|
|||||||
"editor.formatOnSave": true,
|
"editor.formatOnSave": true,
|
||||||
"editor.formatOnType": false,
|
"editor.formatOnType": false,
|
||||||
"editor.formatOnPaste": false,
|
"editor.formatOnPaste": false,
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
|
||||||
"editor.codeActionsOnSave": {
|
"editor.codeActionsOnSave": {
|
||||||
"source.fixAll": "explicit",
|
"source.fixAll": "explicit",
|
||||||
"source.fixAll.eslint": "explicit",
|
"source.fixAll.eslint": "explicit"
|
||||||
"source.organizeImports": "never"
|
|
||||||
// "source.sortImports": "always"
|
|
||||||
},
|
},
|
||||||
"workbench.editorAssociations": {
|
|
||||||
"*.mdc": "default"
|
|
||||||
},
|
|
||||||
"editor.formatOnSaveMode": "modificationsIfAvailable",
|
|
||||||
"search.followSymlinks": false,
|
"search.followSymlinks": false,
|
||||||
"search.exclude": {
|
"search.exclude": {
|
||||||
"**/node_modules": true,
|
"**/node_modules": true,
|
||||||
@ -43,18 +37,16 @@
|
|||||||
".babelrc": "json",
|
".babelrc": "json",
|
||||||
".eslintrc": "jsonc",
|
".eslintrc": "jsonc",
|
||||||
".eslintrc*.json": "jsonc",
|
".eslintrc*.json": "jsonc",
|
||||||
".stylelintrc": "javascript",
|
".stylelintrc": "jsonc",
|
||||||
"stylelintrc": "jsonc",
|
"stylelintrc": "jsonc",
|
||||||
"*.json": "jsonc",
|
"*.json": "jsonc",
|
||||||
"package.json": "json",
|
"package.json": "json",
|
||||||
"*.mdc": "markdown",
|
|
||||||
".htmlhintrc": "jsonc",
|
".htmlhintrc": "jsonc",
|
||||||
"htmlhintrc": "jsonc",
|
"htmlhintrc": "jsonc",
|
||||||
"Procfile*": "shellscript",
|
"Procfile*": "shellscript",
|
||||||
"README": "markdown",
|
"README": "markdown",
|
||||||
"**/coverage/**/*.*": "plaintext",
|
"**/coverage/**/*.*": "plaintext",
|
||||||
"OWNERS": "yaml",
|
"OWNERS": "yaml",
|
||||||
// 需要将 pnpm-lock file 设置为 plaintext,不做解析,否则打开文件时 vscode 容易卡死
|
|
||||||
"**/pnpm-lock.yaml": "plaintext",
|
"**/pnpm-lock.yaml": "plaintext",
|
||||||
"**/dist/**": "plaintext",
|
"**/dist/**": "plaintext",
|
||||||
"**/dist_*/**": "plaintext",
|
"**/dist_*/**": "plaintext",
|
||||||
@ -68,9 +60,7 @@
|
|||||||
"**/CVS": true,
|
"**/CVS": true,
|
||||||
"**/.DS_Store": true,
|
"**/.DS_Store": true,
|
||||||
"**/Thumbs.db": true,
|
"**/Thumbs.db": true,
|
||||||
"**/.rush": true,
|
"**/.rush": true
|
||||||
"**/.swc": true,
|
|
||||||
"**/rush-logs": true
|
|
||||||
},
|
},
|
||||||
"files.watcherExclude": {
|
"files.watcherExclude": {
|
||||||
"**/.git/objects/**": true,
|
"**/.git/objects/**": true,
|
||||||
@ -90,48 +80,24 @@
|
|||||||
"typescript",
|
"typescript",
|
||||||
"typescriptreact"
|
"typescriptreact"
|
||||||
],
|
],
|
||||||
"editor.semanticHighlighting.enabled": false,
|
|
||||||
"eslint.format.enable": true,
|
"eslint.format.enable": true,
|
||||||
"eslint.enable": true,
|
"eslint.lintTask.enable": true,
|
||||||
"eslint.useFlatConfig": true,
|
|
||||||
"eslint.codeActionsOnSave.mode": "problems",
|
|
||||||
"eslint.lintTask.enable": false,
|
|
||||||
"javascript.validate.enable": false,
|
"javascript.validate.enable": false,
|
||||||
|
"typescript.validate.enable": true,
|
||||||
"typescript.tsdk": "config/ts-config/node_modules/typescript/lib",
|
"typescript.tsdk": "config/ts-config/node_modules/typescript/lib",
|
||||||
"typescript.enablePromptUseWorkspaceTsdk": true,
|
"typescript.tsserver.maxTsServerMemory": 8192,
|
||||||
"typescript.disableAutomaticTypeAcquisition": true,
|
// "typescript.tsserver.experimental.enableProjectDiagnostics": true,
|
||||||
"typescript.format.enable": false,
|
|
||||||
"typescript.referencesCodeLens.enabled": false,
|
|
||||||
"typescript.preferGoToSourceDefinition": true,
|
|
||||||
"typescript.updateImportsOnFileMove.enabled": "never",
|
|
||||||
// tsserver log 不会自动删除,日积月累,导致磁盘空间不足,因此默认关闭
|
|
||||||
"typescript.tsserver.log": "off",
|
|
||||||
"typescript.tsserver.experimental.enableProjectDiagnostics": false,
|
|
||||||
"typescript.workspaceSymbols.excludeLibrarySymbols": true,
|
|
||||||
"editor.minimap.enabled": true,
|
|
||||||
"typescript.preferences.includePackageJsonAutoImports": "off",
|
|
||||||
"typescript.suggest.autoImports": true,
|
|
||||||
"typescript.tsserver.maxTsServerMemory": 10240,
|
|
||||||
"typescript.tsserver.enableRegionDiagnostics": false,
|
|
||||||
"typescript.tsserver.watchOptions": {
|
"typescript.tsserver.watchOptions": {
|
||||||
"fallbackPolling": "dynamicPriorityPolling",
|
"fallbackPolling": "dynamicPriorityPolling",
|
||||||
"synchronousWatchDirectory": true,
|
"synchronousWatchDirectory": false,
|
||||||
"watchDirectory": "useFsEvents",
|
"watchDirectory": "dynamicPriorityPolling",
|
||||||
"watchFile": "useFsEventsOnParentDirectory",
|
"watchFile": "useFsEventsOnParentDirectory"
|
||||||
"excludeDirectories": ["/**/node_modules"],
|
|
||||||
"excludeLibrarySymbols": true,
|
|
||||||
"excludeFiles": ["/**/node_modules/**"]
|
|
||||||
},
|
},
|
||||||
"css.validate": false,
|
"css.validate": false,
|
||||||
"scss.validate": false,
|
"scss.validate": false,
|
||||||
"less.validate": false,
|
"less.validate": false,
|
||||||
"stylelint.enable": true,
|
|
||||||
"stylelint.validate": ["css", "scss", "less"],
|
|
||||||
// "stylelint.stylelintPath": "config/stylelint-config/node_modules/stylelint",
|
|
||||||
"emmet.triggerExpansionOnTab": true,
|
"emmet.triggerExpansionOnTab": true,
|
||||||
"[typescript]": {
|
|
||||||
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
|
||||||
},
|
|
||||||
"[yaml]": {
|
"[yaml]": {
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||||
},
|
},
|
||||||
@ -141,12 +107,6 @@
|
|||||||
"[html]": {
|
"[html]": {
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||||
},
|
},
|
||||||
"[javascript]": {
|
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
||||||
},
|
|
||||||
"[javascriptreact]": {
|
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
||||||
},
|
|
||||||
"[json]": {
|
"[json]": {
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||||
},
|
},
|
||||||
@ -154,14 +114,20 @@
|
|||||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||||
},
|
},
|
||||||
"[less]": {
|
"[less]": {
|
||||||
"editor.defaultFormatter": "stylelint.vscode-stylelint"
|
"editor.defaultFormatter": "vscode.css-language-features"
|
||||||
},
|
},
|
||||||
"[scss]": {
|
"[typescript]": {
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
||||||
|
},
|
||||||
|
"[javascriptreact]": {
|
||||||
|
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
||||||
},
|
},
|
||||||
"[typescriptreact]": {
|
"[typescriptreact]": {
|
||||||
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
||||||
},
|
},
|
||||||
|
"[scss]": {
|
||||||
|
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||||
|
},
|
||||||
"[ignore]": {
|
"[ignore]": {
|
||||||
"editor.defaultFormatter": "foxundermoon.shell-format"
|
"editor.defaultFormatter": "foxundermoon.shell-format"
|
||||||
},
|
},
|
||||||
@ -173,14 +139,5 @@
|
|||||||
},
|
},
|
||||||
"[svg]": {
|
"[svg]": {
|
||||||
"editor.defaultFormatter": "jock.svg"
|
"editor.defaultFormatter": "jock.svg"
|
||||||
},
|
}
|
||||||
"svg.preview.background": "white",
|
|
||||||
"[xml]": {
|
|
||||||
"editor.defaultFormatter": "mblode.pretty-formatter"
|
|
||||||
},
|
|
||||||
"[sql]": {
|
|
||||||
"editor.defaultFormatter": "adpyke.vscode-sql-formatter"
|
|
||||||
},
|
|
||||||
"git.openRepositoryInParentFolders": "always",
|
|
||||||
"references.preferredLocation": "view"
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user