This is pretty good advice. I have been using a combination of editorconfig files with pre-commit hooks to run linting and formatting which enforces 'eol'.
Your solution is more elegant. Reading the github reference on this, it might be better to do it this way, using auto.
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto
*.js text
*.jsx text
*.json text
This way, whatever OS you are no, git will decide the correct 'eol' to apply for you.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
This is pretty good advice. I have been using a combination of editorconfig files with pre-commit hooks to run linting and formatting which enforces 'eol'.
Your solution is more elegant. Reading the github reference on this, it might be better to do it this way, using auto.
This way, whatever OS you are no, git will decide the correct 'eol' to apply for you.