Convert ^M (Windows) line breaks to normal line breaks

Command :%s/<Ctrl-V><Ctrl-M>/\r/g Where <Ctrl-V><Ctrl-M> means type Ctrl+V then Ctrl+M. Explanation :%s substitute, % = all lines <Ctrl-V><Ctrl-M> ^M characters (the Ctrl-V is a Vim way of writing the Ctrl ^ character and Ctrl-M writes the M after the regular expression, resulting to ^M special character) /\r/ with new line (\r) g And do it globally … Read more

Why do I keep getting “[eslint] Delete `CR` [prettier/prettier]”?

Try setting the “endOfLine”:”auto” in your .prettierrc (or .prettierrc.json) file (inside the object) Or set ‘prettier/prettier’: [ ‘error’, { ‘endOfLine’: ‘auto’, } ] inside the rules object of the eslintrc file. If you are using windows machine endOfLine can be “crlf” basing on your git config.