Open
Conversation
Changes Made to the Prettier Configuration
1. Enabled Semicolons
Changed `semi` from `false` to `true`.
This prevents potential issues caused by JavaScript’s Automatic Semicolon Insertion (ASI) and reduces unexpected edge-case bugs.
It’s generally safer for team environments.
2. Reduced printWidth from 120 to 100
Improves readability in pull requests and side-by-side code reviews.
Prevents overly long lines on smaller laptop screens.
100 is a widely adopted compromise in many modern codebases.
3. Added `arrowParens: always`
Ensures parentheses are always used in arrow functions (x) => {} instead of x => {}.
Improves consistency and avoids noisy diffs when parameters change.
4. Added `endOfLine: lf`
Forces consistent line endings across macOS, Linux, and Windows.
Prevents unnecessary diffs caused by mixed line endings.
5. Disabled Tabs in YAML Overrides
Changed YAML override to use spaces instead of tabs.
YAML is indentation-sensitive and can break when using tabs.
Using spaces avoids subtle formatting errors.
6. Added bracketSpacing and bracketSameLine
bracketSpacing: true` improves readability in object literals { foo: 'bar'}.
bracketSameLine: false` keeps closing brackets on a new line for better clarity in JSX/HTML.
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.
Changes Made to the Prettier Configuration
Changed
semifromfalsetotrue.This prevents potential issues caused by JavaScript’s Automatic Semicolon Insertion (ASI) and reduces unexpected edge-case bugs.
It’s generally safer for team environments.
Improves readability in pull requests and side-by-side code reviews.
Prevents overly long lines on smaller laptop screens.
100 is a widely adopted compromise in many modern codebases.
arrowParens: alwaysEnsures parentheses are always used in arrow functions (x) => {} instead of x => {}.
Improves consistency and avoids noisy diffs when parameters change.
endOfLine: lfForces consistent line endings across macOS, Linux, and Windows.
Prevents unnecessary diffs caused by mixed line endings.
Changed YAML override to use spaces instead of tabs.
YAML is indentation-sensitive and can break when using tabs.
Using spaces avoids subtle formatting errors.
bracketSpacing: true
improves readability in object literals { foo: 'bar'}. bracketSameLine: falsekeeps closing brackets on a new line for better clarity in JSX/HTML.📌 Summary
🔍 Reviewer Notes
🧹 Checklist