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

2021-10-05  本文已影响0人  前端开发_Eric

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
上一篇 下一篇

猜你喜欢

热点阅读