素材巴巴 > 程序开发 >

vscode 规则配置

程序开发 2023-09-13 19:03:38

 

{

  // 这几项开启后会两次格式化

  // eslint.enable禁用时, 开启能使用prettier进行格式化

  // eslint.enable开启时, 关闭使用eslint来进行格式化

  "editor.formatOnPaste": true,

  // eslint

  // "eslint.enable": true,

  "eslint.alwaysShowStatus": true,

  "eslint.packageManager": "yarn",

  "editor.codeActionsOnSave": {

    "source.fixAll.eslint": true

  },

  "eslint.validate": [

    "javascript",

    "javascriptreact",

    "typescript",

    "typescriptreact",

    "html",

    "vue"

  ],

  "[typescriptreact]": {

    "editor.defaultFormatter": "esbenp.prettier-vscode"

  },

  "[javascript]": {

    "editor.defaultFormatter": "esbenp.prettier-vscode"

  },

  "[typescript]": {

    "editor.defaultFormatter": "esbenp.prettier-vscode"

  },

  "explorer.confirmDelete": false,

  "eslint.codeAction.showDocumentation": {

    "enable": true

  },

  // "prettier.arrowParens": "avoid", 

  // //  (x) => {} 箭头函数参数只有一个时是否要有小括号。avoid:省略括号

  // "editor.semanticTokenColorCustomizations": null,

  "prettier.arrowParens": "avoid",

  "[vue]": {

    "editor.defaultFormatter": "esbenp.prettier-vscode"

  },

  "[html]": {

    "editor.defaultFormatter": "esbenp.prettier-vscode"

  },

  "window.zoomLevel": 0,

  "git.ignoreWindowsGit27Warning": true,

  "editor.rulers": [

  ],

  "typescript.format.enable": false,

  "typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": false,

  "typescript.format.insertSpaceAfterOpeningAndBeforeClosingEmptyBraces": false,

  "typescript.format.insertSpaceAfterCommaDelimiter": false,

  "javascript.format.insertSpaceBeforeAndAfterBinaryOperators": false,

  "javascript.format.insertSpaceAfterSemicolonInForStatements": false,

  "javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": false,

  "javascript.format.insertSpaceAfterOpeningAndBeforeClosingEmptyBraces": false,

  "javascript.format.insertSpaceAfterCommaDelimiter": false,

  "javascript.format.enable": false,

  "json.format.enable": false,

  "html.format.preserveNewLines": false,

  "editor.formatOnType": true,

  "javascript.format.insertSpaceAfterConstructor": true,

  "typescript.format.insertSpaceAfterConstructor": true,

  "diffEditor.ignoreTrimWhitespace": false,

  "git.autofetch": true,

  "[less]": {

    "editor.defaultFormatter": "esbenp.prettier-vscode"

  },

  "settingsSync.ignoredExtensions": [

    "hookyqr.beautify"

  ],

  "code-runner.clearPreviousOutput": true,

  "files.defaultLanguage": "javascrpt",

  "code-runner.defaultLanguage": "javascrpt",

  "php.suggest.basic": false,

  "css.lint.hexColorLength": "ignore",

  "scss.lint.hexColorLength": "ignore",

  "less.lint.hexColorLength": "ignore",

  "files.associations": {

    "*.vue": "vue"

  },

  "workbench.sideBar.location": "left",

  "workbench.activityBar.visible": true,

  "editor.minimap.enabled": true,

  "[css]": {

    "editor.defaultFormatter": "HookyQR.beautify"

  },

  "[json]": {

    "editor.defaultFormatter": "HookyQR.beautify"

  }

}


标签:

素材巴巴 Copyright © 2013-2021 http://www.sucaibaba.com/. Some Rights Reserved. 备案号:备案中。