gts icon indicating copy to clipboard operation
gts copied to clipboard

gts check enforces eol=lf on Windows

Open dotdoom opened this issue 5 years ago • 1 comments

This one may be WAI because gts is supposed to be opinionated. But with default git settings, which instruct git to automatically convert LF to CRLF for text files on Windows, it is not working well out of the box. More about this in https://eslint.org/docs/rules/linebreak-style#using-this-rule-with-version-control-systems ("Using this rule with version control systems" section).

Anyway, if the intention is to leave the enforcement with "unix", maybe you'd like to add this link to README?


For posterity: I'm getting these errors from our CI which builds on Windows (btw -- doesn't happen on Mac builds):

src\index.ts
##[error]    1:48   error  Delete `␍`  prettier/prettier
##[error]    2:50   error  Delete `␍`  prettier/prettier
##[error]    3:50   error  Delete `␍`  prettier/prettier
##[error]    4:26   error  Delete `␍`  prettier/prettier
##[error]    5:28   error  Delete `␍`  prettier/prettier
...

dotdoom avatar Apr 11 '20 06:04 dotdoom

Tried GTS in my project managed by Git and got lots of such errors. I completely agree that this behavior on Windows machines should be mentioned in the README.md.

dobromyslov avatar Aug 14 '20 04:08 dobromyslov