当在gulp项目中使用eslint时,我遇到了像这样的错误的问题.预期的linebreaks为’LF’,但是发现’CRLF’linebreak-style,我正在使用
Windows环境运行gulp,并且下面给出了整个错误日志
Kiran (master *) Lesson 4 $gulp
:17:08] Using gulpfile c:\Users\Sai\Desktop\web-build-tools\4\
gulpfile.js
:17:08] Starting 'styles'...
:17:09] Finished 'styles' after 17 ms
:17:09] Starting 'lint'...
:17:10] 'lint' errored after 1.14 s
:17:10] ESLintError in plugin 'gulp-eslint'
sage:
Expected linebreaks to be 'LF' but found 'CRLF'.
ails:
fileName: c:\Users\Sai\Desktop\web-build-tools\4\js\extra.js
lineNumber: 1
:17:10]
Users\Sai\Desktop\web-build-tools\4\js\extra.js
:29 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
:28 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
:2 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
:1 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
我还包括extra.js文件作为错误,指出可能的错误.
function getWindowHeight() {
return window.innerHeight;
}
getWindowHeight();