Visual Studio Code代码校验-eslint代码校验

前端开发 3年前 (2020) bestcyt
19 0 0

Vue项目代码书写规范校验

项目开启代码校验

...(config.dev.useEslint ? [createLintingRule()] : []),

Visual Studio Code插件安装

Visual Studio Code代码校验-eslint代码校验

插件配置

打开命令版输入:setting.json选择最后一个替换下面的代码,然后保存即可
 

{
    "window.zoomLevel": 0,
    "editor.mouseWheelZoom": true,
    "open-in-browser.default": "chrome",
    "files.autoSave": "afterDelay",
    "files.autoSaveDelay": 60000,
    "explorer.confirmDelete": false,
    "editor.codeActionsOnSave": {
        "source.fixAll.eslint": true
    },
    "editor.snippetSuggestions": "top",
    "editor.formatOnPaste": true,
    "[html]": {
        "editor.defaultFormatter": "HookyQR.beautify"
    },
    "editor.minimap.enabled": false,
    "[javascript]": {
        "editor.defaultFormatter": "HookyQR.beautify"
    },
    "editor.renderIndentGuides": false,
    "eslint.enable": true,
    "extensions.autoUpdate": false,
    "workbench.iconTheme": "vscode-icons",
    "eslint.autoFixOnSave": true,
    "auto-rename-tag.activationOnLanguage": [
        "html",
        "xml",
        "php",
        "javascript",
        "vue"
    ],
    "eslint.validate": [
        "javascript",
        "javascriptreact",
        {
            "language": "vue",
            "autoFix": true
        }
    ],
    "bracket-pair-colorizer-2.colors": [
        "Gold",
        "Orchid",
        "LightSkyBlue"
    ],
    "workbench.colorTheme": "Monokai"
}

 

版权声明:bestcyt 发表于 2020年4月15日 pm1:13。
转载请注明:Visual Studio Code代码校验-eslint代码校验 | 爱前端导航

相关文章

联系站长