← 返回首页
Add .gitattributes to normalize line endings to LF by rimsha-shoukat · Pull Request #2144 · trekhleb/javascript-algorithms · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

Add .gitattributes to normalize line endings to LF#2144

Open
rimsha-shoukat wants to merge 1 commit into
trekhleb:masterfrom
rimsha-shoukat:fix/line-endings-gitattributes
Open

Add .gitattributes to normalize line endings to LF#2144
rimsha-shoukat wants to merge 1 commit into
trekhleb:masterfrom
rimsha-shoukat:fix/line-endings-gitattributes

Conversation

Copy link
Copy Markdown

Problem

Windows users face ESLint linebreak-style errors on fresh clone
because Git on Windows auto-converts LF to CRLF on checkout.

This causes npm run lint to report thousands of errors on Windows
without the contributor changing a single line of code.

Fix

Added .gitattributes to enforce LF line endings across all
platforms so npm run lint passes on Windows, Linux and macOS
without any manual intervention.

Testing

  • Verified npm run lint passes on Windows after this change

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Footer

© 2026 GitHub, Inc.