Skip to content

fix file#2958

Open
saarors wants to merge 3 commits intolinode:mainfrom
saarors:patch-1
Open

fix file#2958
saarors wants to merge 3 commits intolinode:mainfrom
saarors:patch-1

Conversation

@saarors
Copy link

@saarors saarors commented Feb 18, 2026

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.

  1. 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.

  1. Added arrowParens: always

Ensures parentheses are always used in arrow functions (x) => {} instead of x => {}.
Improves consistency and avoids noisy diffs when parameters change.

  1. Added endOfLine: lf

Forces consistent line endings across macOS, Linux, and Windows.
Prevents unnecessary diffs caused by mixed line endings.

  1. 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.

  1. 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.

📌 Summary

🔍 Reviewer Notes

🧹 Checklist

  • Code is readable, maintainable, and robust.
  • Unit tests added/updated

 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.
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.

2 participants

Comments