关于Eslint语法检查报“error Extra semicolon semi”错误的解决办法

1、 5:35 error Extra semicolon semi
6:25 error Extra semicolon semi

✖ 2 problems (2 errors, 0 warnings)
2 errors and 0 warnings potentially fixable with the --fix option.

这个错误的原因是我们在语句末尾使用了引号,去掉分号后就可以顺利跑通了。这又是为什么呢?这是因为vscode的插件ESlint的原因。ESlint在格式化文档的时候会自动添加分号。这可能会让我们感觉不舒服,觉得不规范。有没有什么办法呢?有的。我们可以去掉ESlint的检查规则。

猜你喜欢

转载自blog.csdn.net/qq_39598825/article/details/127720121
今日推荐