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

版权声明:原创博文,转载请注明出处~ https://blog.csdn.net/She_lock/article/details/81983750

错误信息

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.

如上错误信息,什么少一个空格啦,多一个空行啦~~~,都是因为开启了eslint 编码规范检查。像咱们Java开发的,偶尔用用这个,是不是很头疼。。。特别是对于那些有强迫症的同学来说。

解决办法

去到webpack.base.conf.js中,找到module节点下的rules节点,注释掉这一行:

// ...(config.dev.useEslint ? [createLintingRule()] : []),

最后,重启一下npm run dev,就不会出现这么苛刻的编码规范要求了。

猜你喜欢

转载自blog.csdn.net/She_lock/article/details/81983750