废话不多说直接开始
vscode从插件库里安装eslint
和prettier
一般默认第一个就是
为了避免搜不到,截图两枚


接下来就要进入vscode本地配置项了
进入配置项(mac)

配置项
{
"window.zoomLevel": 1, // 窗口大小比例
"editor.tabSize": 2,
"editor.detectIndentation": false,
"emmet.triggerExpansionOnTab": true,
"update.channel": "none",
"editor.formatOnSave": true, // eslint保存格式化
"javascript.format.enable": false, // 不启动JavaScript格式化
"prettier.eslintIntegration": true // 让prettier遵循eslint格式美化
}
结束
一般这样的话,出现eslint提示后,保存即可修改成功。有问题请评论,看到会立即回复,如果我写错了请指出错误,谢谢各位~
网友评论