欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

vscode-settings.json配置

程序员文章站 2022-05-23 19:51:06
...

vscode从插件库里安装eslint和prettier

vscode-settings.json配置
vscode-settings.json配置

点击左上角【文件】–>【首选项】–>【设置】
vscode-settings.json配置

把下面的内容粘贴进去即可

{
    "extensions.ignoreRecommendations": false,
    "team.showWelcomeMessage": false,
    "git.enableSmartCommit": true,
    "vsicons.dontShowNewVersionMessage": true,
    "git.autofetch": true,
    "react.beautify.onSave": true,
    "files.associations": {
        "*.js": "javascriptreact"
    },
    "git.confirmSync": false,
    "explorer.confirmDelete": false,
    "[markdown]": {},
    "eslint.enable": true,
    "eslint.options": {
        "extensions": [
            ".js",
            ".jsx",
            ".vue"
        ]
    },
    "eslint.validate": [
        "javascript",
        "javascriptreact",
        {
            "language": "vue",
            "autoFix": true
        }
    ],
    "vetur.validation.template": false,
    "eslint.autoFixOnSave": true,
    "editor.tabSize": 2,
    "jest.autoEnable": false,
    "jest.pathToConfig": "./.jest.js",
    "terminal.integrated.rendererType": "dom",
    "window.zoomLevel": 0,
    "editor.quickSuggestions": {
        "strings": true
    },
    "diffEditor.renderSideBySide": true,
    "files.autoSave": "afterDelay",
    "editor.codeActionsOnSave": {
        "source.fixAll.eslint": true 
    },
    "editor.fontSize": 18,
    "workbench.editorAssociations": [
    
    ]
}

参考:
自己的vscode-settings.json配置
Vue学习笔记:提升开发效率和体验的常用工具