配置:vscode setting 配置

闾丘德业
2023-12-01

之前:
  "editor.suggestSelection": "first",
  "editor.formatOnSave": false, // 不同文件使用默认格式化工具 ,可能会与eslint 冲突
  "editor.codeActionsOnSave": { "source.fixAll.eslint": true }, // 使用eslint fix
  "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
  "files.associations": {
    "*.vue": "vue",
    "*.wpy": "vue",
    "*.wxml": "html",
    "*.wxss": "css"
  },
  "eslint.validate": ["html", "vue", "javascript", "javascriptreact"],
  "vetur.format.defaultFormatter.html": "js-beautify-html",
  "vetur.format.defaultFormatter.js": "prettier-eslint",
  "vetur.format.defaultFormatter.css": "prettier",
  "vetur.format.defaultFormatter.scss": "prettier",
  "vetur.validation.template": false, // 不检查语法
  "vetur.format.defaultFormatterOptions": {
    "js-beautify-html": {
      "wrap_attributes": "force-aligned",
      "indent_size": 2
    }
  },
  "[json]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[html]": {
    "editor.defaultFormatter": "vscode.html-language-features"
  },
  "[vue]": {
    "editor.defaultFormatter": "octref.vetur"
  },
  "[jsonc]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[less]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[javascript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "workbench.colorTheme": "SynthWave '84"
}

【建议收藏】全网最全的讲清eslint和prettier的npm包和vscode插件的文章 - 掘金

{
  "editor.suggestSelection": "first",
  "terminal.integrated.profiles.windows": {
    "Git-Bash": {
      "path": "C:\\Program Files\\Git\\bin\\bash.exe",
      "args": []
    }
  },
  "terminal.integrated.defaultProfile.windows": "Git-Bash",
  "editor.formatOnSave": true, // 不同文件使用默认格式化工具 ,可能会与eslint 冲突
  "editor.formatOnType": true,
  "eslint.codeAction.showDocumentation": {
    "enable": true
  },
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  }, // 使用eslint fix
  "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
  "files.associations": {
    "*.vue": "vue",
    "*.wpy": "vue",
    "*.wxml": "html",
    "*.wxss": "css"
  },
  "eslint.validate": ["html", "vue", "javascript", "javascriptreact"],
  "vetur.format.defaultFormatter.html": "js-beautify-html",
  "vetur.format.defaultFormatter.js": "prettier-eslint",
  "vetur.format.defaultFormatter.css": "prettier",
  "vetur.format.defaultFormatter.scss": "prettier", // 不检查语法
  "vetur.format.defaultFormatterOptions": {
    "js-beautify-html": {
      "wrap_attributes": "force-aligned",
      "indent_size": 2
    }
  },
  "[json]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[html]": {
    "editor.defaultFormatter": "vscode.html-language-features"
  },
  "[vue]": {
    "editor.defaultFormatter": "Vue.volar"
  },
  "[jsonc]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[less]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[javascript]": {
    "editor.defaultFormatter": "vscode.typescript-language-features"
  },
  "workbench.colorTheme": "SynthWave '84",
  "editor.fontSize": 16,
  "explorer.confirmDelete": false,
  "terminal.integrated.altClickMovesCursor": false,
  "[scss]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[javascriptreact]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "workbench.editor.enablePreview": false,
  "git.autofetch": true,
  "vetur.validation.template": false,
  "workbench.experimental.editor.dropIntoEditor.enabled": false,
  "html.format.contentUnformatted": "",
  "security.workspace.trust.untrustedFiles": "open",
  "workbench.layoutControl.enabled": false,
  "git.enableSmartCommit": true,
  "window.commandCenter": true
}

 类似资料: