Vue报错和警告 // eslint-disable-next-line to ignore the next line

出现这样的提示:
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报错和警告 // eslint-disable-next-line to ignore the next line
是因为开启了eslint 编码规范检查,多一个空格,多一个空行都会报错。
所以最好关掉这个配置。就不会头疼啦。
所以到项目文件下找build下的webpack.base.conf.js文件。里面有个module.export里面的module对象,然后找到rule,将…(config.dev.useEslint ? [createLintingRule()] : [])这句话注释掉就可以,然后重新启动项目即npm run dev
Vue报错和警告 // eslint-disable-next-line to ignore the next line