美文网首页
vscode代码自动代码格式化(添加分号)

vscode代码自动代码格式化(添加分号)

作者: 前端开发_Eric | 来源:发表于2021-10-05 17:22 被阅读0次

    If you are using yarn or pnpm instead of npm set the setting eslint.packageManager to either yarn or pnpm
    Alternatively you can disable ESLint for the workspace folder front-basic-knowledge by executing the 'Disable ESLint' command.
    [Info - 4:48:07 PM]
    Failed to load the ESLint library for the document /Users/wangshihao/Desktop/github/front-basic-knowledge/jsbasic/async/shark/8.10async2.js

    To use ESLint please install eslint by running npm install eslint in the workspace folder front-basic-knowledge
    or globally using 'npm install -g eslint'. You need to reopen the workspace after installing eslint.

    If you are using yarn or pnpm instead of npm set the setting eslint.packageManager to either yarn or pnpm
    Alternatively you can disable ESLint for the workspace folder front-basic-knowledge by executing the 'Disable ESLint' command.

    1.安装插件 eslint 与 prettier

    2.设置setting.json

    "editor.formatOnSave": true,
    "editor.codeActionsOnSave": {
        "source.fixAll.eslint": true
    },
    

    file -> Preferences -> setting ,设置默认的Formatter

    image.png image.png image.png image.png

    相关文章

      网友评论

          本文标题:vscode代码自动代码格式化(添加分号)

          本文链接:https://www.haomeiwen.com/subject/piegnltx.html