error: Expected linebreaks to be ‘LF’ but found ‘CRLF’
这就是eslint的报错了,可能是原作者用的事linux系统。
只需在eslintrc文件里面将/*eslint linebreak-style: ["error", "unix"]*/
改成/*eslint linebreak-style: ["error", "windows"]*/
(我用的是windows):
或者 'linebreak-style': ["off", "windows"],
如图:
如果没有直接添加相应的linebreak-style属性即可。
我是这么干的:
git config --global core.autocrlf false----------------------------zs 然后在工作区设置(如通过vscode f1打开工作区设置搜索crlf 进行设置是windos的换行还是linux的换行)
记得需要先设置在git clone代码