vue cli4如何关闭eslint的校验
小白浏览:7282020-11-30 16:45:33本文累计收益:0我也要赚钱

在vue创建项目的时候,如果你错误开启了eslint的校验,代码不规范就会有以下报错

48 errors potentially fixable with the `--fix` option. 

You may use special comments to disable some warnings.

Use // eslint-disable-next-line to ignore the next line.

Use /* eslint-disable */ to ignore all warnings in a file.

那我们应该如何去关闭呢?

vue cli4项目中会有单独的一个eslintrc.js文件,这个js文件里面就是代码规范的配置项,你可以尝试注释掉'@vue/standard', 即关闭Eslint语法规范,

    // '@vue/standard'

重启项目npm run serve即可。

评论列表
发表评论
+ 关注