安装了eslint的插件
然后做了以下的配置:
{
"eslint.codeAction.showDocumentation": {
"enable": true
},
"editor.detectIndentation": true,
"editor.tabSize": 2,
"editor.formatOnSave": true,
"eslint.validate": [
"javascript",
"javascriptreact"
],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}
虽然保存文件以后的确格式化了 但是还是会有去不掉的红线
如何做才能自动保存 自动格式化?
解决了:
.eslintrc.js中一个选项:
删除了就好了