vue-cli -y搭建项目后eslint报错"Expected linebreaks to be 'LF' but found 'CRLF'"

eslint报错"Expected linebreaks to be ‘LF’ but found ‘CRLF’"

  • 问题描述:

vue-cli -y搭建项目后,运行项目eslint报错"Expected linebreaks to be ‘LF’ but found ‘CRLF’"

  • 问题分析:

出现原因是eslint语法检测linebreaks格式统一

  • 解决方法:

在.eslintrc文件 rules 里面 配置 “linebreak-style”: [0 ,“error”, “windows”], 意思是允许windows开发环境

 'linebreak-style': [0 ,'error', 'windows'] // 允许windows开发环境

猜你喜欢

转载自blog.csdn.net/Calla_Lj/article/details/88874599