google / google/gts

gts check enforces eol=lf on Windows

Open
#485 1 comment 5 reactions 0 assignees View on GitHub
type: docs
Dominant language
TypeScript
Stars
5.3k
Forks
212
PR merge metrics
No merged PRs in 30d

Description

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
...
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.