0

I have started working in a team. They have a huge file, I cloned the project and I am getting "Expected linebreaks to be 'LF' but found 'CRLF'." error after running "npm run build". (I am on windows) There are around 50 .eslintrc files. How can I fix this error without changing any files?

Nayereh Rasuli
  • 216
  • 2
  • 8
  • Are you all using the same OS? Is your git config similar to the other team members? I'm thinking that you're on Windows, and git is converting LF to CRLF locally. That breaks eslint for you, but they're not seeing any problems because they're not on Windows, or because they've got git configured to use LF, rather than CRLF. – Roger Lipscombe Jun 17 '22 at 16:54
  • See https://stackoverflow.com/questions/62554245/how-can-i-use-lf-line-endings-in-git-for-windows-in-2020-for-good, for example. – Roger Lipscombe Jun 17 '22 at 16:55
  • How can I configure git to use LF and not CRLF? – Nayereh Rasuli Jun 17 '22 at 16:57
  • See the linked question. Also ask the other team members. Maybe it's like this for a reason. – Roger Lipscombe Jun 17 '22 at 16:59

0 Answers0