1 vsCode中安装

clipboard.png
2 配置

clipboard.png

clipboard.png
// 保存时自动格式化

"eslint.autoFixOnSave": true,
// 用来配置作用的文件类型
"eslint.validate": [
    "javascript",
    "javascriptreact",
    {
        "language": "html",
        "autoFix": true
    },
    {
        "language": "vue",
        "autoFix": true
    }
]

全局安装eslint
npm i eslint -g

HappyCodingTop
526 声望847 粉丝

Talk is cheap, show the code!!