- vscode安装插件eslint
- 打开一个新命令窗口,运行
- 在vscode中打开file>preferences>settings>Extensions>eslint--->edit in settings.json中添加
{ "files.autoSave": "off", "eslint.validate": [ "javascript", "javascriptreact", "vue-html", { "language": "vue", "autoFix": true } ], "eslint.run": "onSave", "eslint.autoFixOnSave": true }
4.查看vscode右下脚的eslint是否启用,如果是没有启用则点击启用(这一步很关键)
vscode+eslint
最新推荐文章于 2024-03-30 16:41:54 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)