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
{{ message }}
Repository navigation
pnpm lint fails on every file in a Windows clone because of line endings #62
In a normal Windows clone of this repo, pnpm lint reports an error in all 11 files it checks, so a Windows contributor can't get a clean lint run before opening a PR. The code is fine. Git gave the files Windows line endings, and Biome, the formatter, expects Linux ones.
Why it happens
A line ending is the invisible character at the end of each line: LF on Linux and macOS, CRLF ("carriage return + line feed") on Windows.
The repo has no .gitattributes file, the file that tells Git how to treat line endings.
Git for Windows is installed with core.autocrlf=true by default. That setting stores LF in the repository but checks files out with CRLF. Every file in this repo is stored with LF (git ls-files --eol shows i/lf for all 27), so on Windows every one arrives as w/crlf.
biome.json doesn't set lineEnding, so Biome uses its default, LF. It sees a CRLF file as misformatted, and biome check (= pnpm lint, package.json) reports each one. Every diff it prints is only a ␍ at the end of each line.
CI (ci.yml) runs on Ubuntu, where the checkout is LF, so CI never sees this.
Who is affected
Anyone who clones the repo on Windows with Git's default settings (no WSL). The other steps work there: pnpm generate && git diff --exit-code, pnpm typecheck and node check-claims.mjs all pass in the same clone. Only lint fails.
How to see it (Windows 11, Node 24, Git for Windows defaults)
git clone https://github.com/prooflinedev/sdk-typescript; cd sdk-typescript
pnpm install --frozen-lockfile
git ls-files --eol src/index.ts
# i/lf w/crlf attr/ src/index.ts
pnpm lint
# Checked 11 files in 41ms. No fixes applied.# Found 11 errors.
Suggested fix
Add a .gitattributes with * text=auto eol=lf, so Git checks text files out with LF on every OS, like CI. No file is stored with CRLF, so this changes nothing in the repository itself. text=auto still lets Git detect binary files and leave them alone. The Python SDK got the same line in prooflinedev/sdk-python#88.
I have a fix with a test ready and will open a PR.
Activity