Why do I have to manually for every file change "CRLF" to "LF" to make eslint(prettier) warning go away?.
Can there be a problem with this approach when committing and other users load the file in their respective environment. As you see on the image I get "eslint": "^6.6.0"
complaint and when I toggle the down right "CRLF" to "LF" then eslint(prettier) is happy.
Can this be a problem later?
Line breaks are traditionally represented by two bytes (CR and LF) on DOS/Windows systems, and by only one (LF) on Unix/Linux systems. The rule you're seeing, documented for eslint here and for prettier here defaults to saying that all files should use the Unix convention (saying "delete CR" is equivalent to saying "convert CRLF to LF only") to ensure the code base is consistent.
If all your files are currently CRLF, you have two options:
dos2unix
, or by configuring prettier
to fix the problem automatically.As well as fixing your existing files, you might want to look at why they're showing up that way:
git config core.autocrlf false
As for how this will affect other people:
core.autocrlf
setting, or by using a better tool.