Skip to content

Instantly share code, notes, and snippets.

@tjsudarsan
Last active March 12, 2026 18:23
Show Gist options
  • Select an option

  • Save tjsudarsan/f2bfe4c4d567243e302cf8ba40e1c7e5 to your computer and use it in GitHub Desktop.

Select an option

Save tjsudarsan/f2bfe4c4d567243e302cf8ba40e1c7e5 to your computer and use it in GitHub Desktop.
Change End of Line Sequence from CRLF to LF to all files in the project for supporting ESLint

Converting the End of Line Sequence from CRLF to LF in any of your project files

Execute the following commands in your root of your project folder

NOTE: Do not do the following steps without commiting your data. As it clears all the git cache and it will clear all your changes in your project.

  1. First disable the autoCRLF in the git config by running the following command in your terminal git config core.autocrlf false

  2. Then remove the cached files in the git. Run the following command: git rm --cached -r .

  3. Then reset the project files by executing the following command to complete conversion. git reset --hard

That's it now all the files that have CRLF will be converted to LF.

Additionally you can add "files.eol": "\n" in your Vscode settings.

@3gi-anita
Copy link
Copy Markdown

csdsa

@eugenioxcastro
Copy link
Copy Markdown

Thanks! Totally Worked

@Binghagoon
Copy link
Copy Markdown

Thanks!!!

@Hugodlf
Copy link
Copy Markdown

Hugodlf commented Jul 11, 2023

THANK YOU BRO

@andreycmartins
Copy link
Copy Markdown

ty

@adamwojszczyk
Copy link
Copy Markdown

Thanks

@sertr4linee
Copy link
Copy Markdown

ty

@Its-Haze
Copy link
Copy Markdown

Nice, thanks!

@sakshamchhimwal
Copy link
Copy Markdown

nice

@tomtechservice
Copy link
Copy Markdown

Awesome.

@daktaritech
Copy link
Copy Markdown

nice!

@harrytran998
Copy link
Copy Markdown

Magic :)) Thanks

@oleksiykalashnyk
Copy link
Copy Markdown

Magic :)) Thanks

@krez69
Copy link
Copy Markdown

krez69 commented Jan 13, 2025

thanks you are the Goat

@SergeOlabin
Copy link
Copy Markdown

πŸ‘ goat

@MenaHub
Copy link
Copy Markdown

MenaHub commented Mar 5, 2025

Thanks bro!

@Zulcom
Copy link
Copy Markdown

Zulcom commented Mar 25, 2025

πŸš€

@cookernetes
Copy link
Copy Markdown

Works flawlessly. Thank you.

@TheUniverse779
Copy link
Copy Markdown

Thank youuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu!!!!!

@AshutoshDash1999
Copy link
Copy Markdown

nice, it works

@sangtrandev00
Copy link
Copy Markdown

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment