eslint

264 阅读1分钟
{
  // 保存时自动格式化代码

  "editor.formatOnSave": true,
  // eslint配置项,保存时自动修复错误
  "editor.codeActionsOnSave": {
    "source.fixAll": true
  },

  // 让vetur使用vs自带的js格式化工具,以便在函数前面加个空格
  "vetur.format.defaultFormatter.js": "vscode-typescript",
  "javascript.format.semicolons": "remove",
  "javascript.format.insertSpaceBeforeFunctionParenthesis": true,
  // 指定 *.vue 文件的格式化工具为vetur
  "[vue]": {
    "editor.defaultFormatter": "octref.vetur"
  },
  // 指定 *.js 文件的格式化工具为vscode自带
  "[javascript]": {
    "editor.defaultFormatter": "vscode.typescript-language-features"
  },
  // 默认使用prettier格式化支持的文件
  "editor.defaultFormatter": "esbenp.prettier-vscode"
}
{
    "terminal.integrated.shell.osx": "/bin/zsh",
    "sync.gist": "f59cfe011d8850da69f7a375309e7e2d",
    "editor.fontSize": 16,
    "workbench.iconTheme": "vscode-icons",
    "hediet.vscode-drawio.local-storage": "eyIuZHJhd2lvLWNvbmZpZyI6IntcImxhbmd1YWdlXCI6XCJcIixcImN1c3RvbUZvbnRzXCI6W10sXCJsaWJyYXJpZXNcIjpcImdlbmVyYWxcIixcImN1c3RvbUxpYnJhcmllc1wiOltcIkwuc2NyYXRjaHBhZFwiXSxcInBsdWdpbnNcIjpbXSxcInJlY2VudENvbG9yc1wiOltdLFwiZm9ybWF0V2lkdGhcIjpcIjI0MFwiLFwiY3JlYXRlVGFyZ2V0XCI6ZmFsc2UsXCJwYWdlRm9ybWF0XCI6e1wieFwiOjAsXCJ5XCI6MCxcIndpZHRoXCI6ODI3LFwiaGVpZ2h0XCI6MTE2OX0sXCJzZWFyY2hcIjp0cnVlLFwic2hvd1N0YXJ0U2NyZWVuXCI6dHJ1ZSxcImdyaWRDb2xvclwiOlwiI2QwZDBkMFwiLFwiZGFya0dyaWRDb2xvclwiOlwiIzZlNmU2ZVwiLFwiYXV0b3NhdmVcIjp0cnVlLFwicmVzaXplSW1hZ2VzXCI6bnVsbCxcIm9wZW5Db3VudGVyXCI6MCxcInZlcnNpb25cIjoxOCxcInVuaXRcIjoxLFwiaXNSdWxlck9uXCI6ZmFsc2UsXCJ1aVwiOlwiXCJ9In0=",
    "tabnine.experimentalAutoImports": true,
    "editor.tabSize": 2,
    "editor.formatOnSave": true,
    "files.autoSave": "afterDelay",
    "prettier.singleQuote": false,
    "eslint.autoFixOnSave": true,
    // An array of language ids which should be validated by ESLint
  "eslint.validate": [
    "javascript",
    // jsx
    "javascriptreact",
    // vue
    {
      "language": "vue",
      "autoFix": true
    },
    // ts
    {
      "language": "typescript",
      "autoFix": true
    },
    // tsx
    {
      "language": "typescriptreact",
      "autoFix": true
    },
    "html"
  ],
  "eslint.alwaysShowStatus": true,
    "files.autoSaveDelay": 50000,
    "[typescriptreact]": {
        "editor.defaultFormatter": "vscode.typescript-language-features"
    },
    "picgo.picBed.smms.token": "4C4weoTktu1YSKuHMM7Q0F6YaXhbcPch",
    "editor.fontFamily": "Courier New",
    "terminal.integrated.fontFamily": "monospace",
    "workbench.colorTheme": "BeardedTheme Anthracite",
    "markdown-preview-enhanced.previewTheme": "one-dark.css",
    "markdown-preview-enhanced.codeBlockTheme": "solarized-dark.css",
    "markdown-preview-enhanced.mermaidTheme": "dark",
    "[javascript]": {
        "editor.defaultFormatter": "vscode.typescript-language-features"
    },
    "editor.codeActionsOnSave": {
        "source.fixAll.eslint": true
    }
}