Skip to content

chore: normalise line endings to LF on checkout - #996

Merged
ryanio merged 1 commit into
mainfrom
chore/normalise-line-endings
Aug 28, 2026
Merged

chore: normalise line endings to LF on checkout#996
ryanio merged 1 commit into
mainfrom
chore/normalise-line-endings

Conversation

@ryanio

@ryanio ryanio commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

Follow-up to #990, which I flagged there as worth doing separately.

Why

biome.json already sets "lineEnding": "lf" and CI checks out LF, but nothing made git itself agree. A contributor on Windows gets CRLF working files that the rest of the tooling does not expect.

That gap is not hypothetical. It is what #990 ran into: the README scan in test/public-exports.spec.ts anchored its code-fence regex on \n, so on a CRLF clone it matched nothing, and exports every symbol the README's code examples import and exports every helper a doc comment promises is exposed both passed over an empty document while looking green. Only the vacuity guard noticed.

#990 fixed the parse to read either ending, which is the right fix for that file and holds however the clone happened. This fixes the divergence at the source, so the next scan someone writes does not have to remember.

Scope

* text=auto eol=lf
*.png binary

img/banner.png is the only binary file tracked today. text=auto already detects it correctly; the explicit line keeps that true if more images land.

No churn

The repo is already uniformly LF in the index, which is why CI has always been green. git add --renormalize . after adding the file reports nothing to change, so this rewrites no content and produces no diff on anyone's next checkout of existing files.

Verified with git check-attr: text files resolve to text: auto, eol: lf, and img/banner.png resolves to text: unset, binary: set.

Checks

npm run lint passes and npm test is 246 passing, unchanged from main.

I cannot approve my own PR, so this needs a code-owner review before it can merge.

biome.json already sets "lineEnding": "lf" and CI checks out LF, but nothing
made git agree, so a Windows clone got CRLF working files that the tooling
did not expect.

That gap is what #990 ran into. The README scan anchored its code-fence regex
on \n, matched nothing on a CRLF checkout, and left two export checks passing
over an empty document. #990 fixed the parse to read either ending; this fixes
the divergence itself, for every file rather than the one that surfaced it.

The repo is already uniformly LF in the index, so `git add --renormalize .`
reports no changes and this adds no content churn.
@ryanio
ryanio merged commit 0fd4066 into main Aug 28, 2026
8 checks passed
@ryanio
ryanio deleted the chore/normalise-line-endings branch August 28, 2026 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant