linebreaks专题

项目中 eslint 报错: Expected linebreaks to be 'LF' but found 'CRLF'

原因:不同系统不同工具下换行符的问题   方法一: 修改eslintrc.js,给rules添加:   'linebreak-style': ['error', 'window'],(如果你用的是windows)    或者   'linebreak-style': ["off", "windows"] 可能需要重新启动项目,或者重新打开vscode   方法二: 如果是w

vue项目报警告:error: Expected linebreaks to be ‘LF’ but found ‘CRLF

原因是:这就是eslint的报错了,可能是原作者用的事linux系统,而我们是用windows 下的bash 解决方案: 项目根目录下有.eslintrc.js文件,在配置文件中修改rule配置项,如下: 'linebreak-style': 'off'