You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By setting end_of_line = lf in .editorconfig, the editor and prettier will write lf line endings, but Git on Windows is often configured with core.autccrlf=true which will check out the files with crlf line endings. To compensate for that, the repository needs to include a .gitattributes with *.{js,jsx,mjs,cjs,ts,tsx,mts,cts,vue} text eol=lf (Or otherwise if that glob syntax is not supported in gitattributes) or maybe just * text=auto eol=lf as recommended by prettier? .
Please describe
By setting
end_of_line = lf
in.editorconfig
, the editor and prettier will writelf
line endings, but Git on Windows is often configured withcore.autccrlf=true
which will check out the files withcrlf
line endings. To compensate for that, the repository needs to include a.gitattributes
with*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,vue} text eol=lf
(Or otherwise if that glob syntax is not supported in gitattributes) or maybe just* text=auto eol=lf
as recommended by prettier? .Additional context
https://git-scm.com/docs/gitattributes#_checking_out_and_checking_in
The text was updated successfully, but these errors were encountered: