Skip to content

Instantly share code, notes, and snippets.

@tjsudarsan
Last active April 10, 2025 12:52
Show Gist options
  • Save tjsudarsan/f2bfe4c4d567243e302cf8ba40e1c7e5 to your computer and use it in GitHub Desktop.
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

csdsa

@eugenioxcastro
Copy link

Thanks! Totally Worked

@Binghagoon
Copy link

Thanks!!!

@Hugodlf
Copy link

Hugodlf commented Jul 11, 2023

THANK YOU BRO

@andreycmartins
Copy link

ty

@adamwojszczyk
Copy link

Thanks

@sertr4linee
Copy link

ty

@Its-Haze
Copy link

Nice, thanks!

@sakshamchhimwal
Copy link

nice

@tomtechservice
Copy link

Awesome.

@daktaritech
Copy link

nice!

@harrytran998
Copy link

Magic :)) Thanks

@oleksiykalashnyk
Copy link

Magic :)) Thanks

@krez69
Copy link

krez69 commented Jan 13, 2025

thanks you are the Goat

@SergeOlabin
Copy link

๐Ÿ‘ goat

@MenaHub
Copy link

MenaHub commented Mar 5, 2025

Thanks bro!

@Zulcom
Copy link

Zulcom commented Mar 25, 2025

๐Ÿš€

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