error: Expected linebreaks to be 'LF' but found 'CRLF'

error: Expected linebreaks to be 'LF' but found 'CRLF'
1. 启用了eslint
2. 换行符不符合规则
解决方式:设置换行的判断规则
打开.eslintrc.js

rules: {
  'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
  'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
  'linebreak-style': ["error", "windows"], //我这个版本是添加了这样一行,声明这是windows操作系统即可。
},

 

posted @ 2019-12-31 21:36  一沙世界  阅读(1535)  评论(0编辑  收藏  举报