Fix: Normalize All Line Endings to LF (CRLF → LF Conversion)#671
Open
vedantvakharia wants to merge 1 commit intoopenclimatefix:mainfrom
Open
Fix: Normalize All Line Endings to LF (CRLF → LF Conversion)#671vedantvakharia wants to merge 1 commit intoopenclimatefix:mainfrom
vedantvakharia wants to merge 1 commit intoopenclimatefix:mainfrom
Conversation
- Add .gitattributes to enforce LF line endings in Git - Update Prettier config to enforce LF endings (endOfLine: 'lf') - Add .editorconfig for editor consistency - Add .prettierignore to exclude large data files - Convert all text files from CRLF to LF using Prettier - Fixes CI Prettier failures on Linux runners This is a one-time infrastructure fix that: - Enables Windows developers to contribute without CI failures - Reduces repository size by excluding data files from formatting - Follows Unix/Linux standard (LF) - Prevents future line ending inconsistencies Technical details: - Changed files: 58 text files - Total line changes: ~91,000 insertions, ~365,000 deletions - Git diff with -w flag shows no actual code changes - Used Prettier for safe, consistent conversion - Large data files (GeoJSON) kept minified for performance Breaking changes: None (purely whitespace)
|
@vedantvakharia is attempting to deploy a commit to the Open Climate Fix Team on Vercel. A member of the Team first needs to authorize it. |
Author
Known CI Issues (Pre-existing)Note: Cypress tests are currently failing due to missing Cypress Cloud configuration. This is a pre-existing issue unrelated to this PR. The CRLF fix has been verified to work correctly:
The Cypress issue is being addressed separately in PR #672 . |
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The repository has inconsistent line endings (mix of CRLF and LF), causing CI failures for contributors using Windows. Prettier on Linux CI expects LF but finds CRLF, producing thousands of "Delete
␍" errors that block pull requests.Root Cause
\r\n)endOfLinein Prettier config → Platform-dependent behaviorExample CI Error
Solution
This PR performs a one-time normalization of all line endings to LF (Linux/Mac standard):
Changes Made
1. Added .gitattributes
2. Updated Prettier Configuration
endOfLine: "lf"explicitly in bothnowcasting-appandquartz-appapps/*/package.jsonfilesBefore:
After:
3. Added .editorconfig
4. Added .prettierignore
5. Converted All Text Files
--writeflag.tsx, .js,.jsx, .json, .md,.css, .yaml,.ymlgit diff -w)Large Data Files Excluded
Intentionally NOT formatted to keep them minified for performance:
Rationale:
apps/*/data/to prevent future formattingImpact
Fixes
Changes
Performance Benefits
Review Guide
This PR is large but simple:
?w=1to the PR URLapps/*/package.json(modified - addedendOfLine)Breaking Changes
None. This is purely a whitespace change. Code functionality is completely unchanged.
Note: This is a critical infrastructure improvement that will benefit all current and future contributors by eliminating a major source of CI failures.