當吞氣項目中,我遇到了一個問題,錯誤這樣
Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
使用eslint發現「CRLF」斷行式在Eslint,我使用的是Windows環境下運行吞掉及以下預計換行符是「LF」,但使用一飲而盡
Kiran (master *) Lesson 4 $ gulp
Using gulpfile c:\Users\Sai\Desktop\web-build-tools\4\
gulpfile.js
Starting 'styles'...
Finished 'styles' after 17 ms
Starting 'lint'...
'lint' errored after 1.14 s
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
$>Users\Sai\Desktop\web-build-tools\4\js\extra.js
error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
整個錯誤日誌中給出我還包括extra.js文件表明可能錯誤的錯誤。
function getWindowHeight() {
return window.innerHeight;
}
getWindowHeight();