Warning: LF will be replaced by CRLF in some.file.

서인·2023년 10월 14일
0

맨날 써야돼서 정리하는 것 !!!

warning: LF will be replaced by CRLF in some.file.
The file will have its original line endings in your working directory

운영체제마다 줄바꿈 문자열이 달라서 생기는 문제라고 한다. 윈도우 사용하면 이런 에러가 나는데, 해당 문구가 뜨면 아래 코드를 사용한다.

git config --global core.autocrlf true

근데 이걸 맨날 치게되면 번거로우니까

  1. .eslintrc.json file 안에 있는 prettier/prettier rule 업데이트 :
"prettier/prettier": [
  "error",
  {
    "endOfLine": "auto"
  }
],
  1. vscode 세팅이 안되어 있다면, .vscode/settings.json도 업데이트 해준다:
{
    "files.eol": "\n",
}

만약 그래도 안되면 .eslintrc.json and .prettierrc.json 파일을 전부 삭제하고 다시 세팅하라고 하는데 위에 커맨드만 치면 대부분 잘 해결된다 ㅎㅎ

profile
> ㅁ <

0개의 댓글