ESLint : Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
1309 단어 pen
해결:
검사eslinttrc.js 설정 여부
/*eslint linebreak-style: ["error", "unix"]*/
Windows 다음 항목의eslinttrc.js
...
rules: {
"linebreak-style": [0,"error", "windows"],
...
}
...
ESLint 문서 참조
linebreak-style
: When developing with a lot of people all having different editors, VCS applications and operating systems it may occur that different line endings are written by either of the mentioned (might especially happen when using the windows and mac versions of SourceTree together).The linebreaks (new lines) used in windows operating system are usually carriage returns (CR) followed by a line feed (LF) making it a carriage return line feed (CRLF) whereas Linux and Unix use a simple line feed (LF). The corresponding control sequences are “” (for LF) and “\r” for (CRLF).
다른 편집기, VCS 응용 프로그램, 운영체제를 사용할 때 사용하는 줄 바꾸기 작업이 다르기 때문에 이런 오류가 발생했다