vue 中 eslint 与 webstorm格式化 报错

Posted yasepix

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了vue 中 eslint 与 webstorm格式化 报错相关的知识,希望对你有一定的参考价值。

 

参考: https://blog.csdn.net/weixin_37219302/article/details/79685351

 

在.eslintrc.js中修改成:

// required to lint *.vue files
plugins: [
‘vue‘,
// 此插件用来识别.html 和 .vue文件中的js代码
‘html‘
],

 

报错: Module build failed: Error: Failed to load plugin html: Cannot find module ‘eslint-plugin-html‘


运行

npm install eslint-plugin-html --save-dev

即可解决

Module build failed: Error: Cannot find module ‘file-loader’

运行 npm install file-loader –save-dev即可解决

这里的file-loader就是你cannot find module ‘XXXXX’

就是你缺少啥插件你安装就行了。

 







以上是关于vue 中 eslint 与 webstorm格式化 报错的主要内容,如果未能解决你的问题,请参考以下文章