[Feature] Add Prettier configuration file to codify formatting rules
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 74/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- javascript
- Domain
- tooling
Research direction
Start with the prettier field in package.json and inspect gulp_scripts/formatter.js, then compare the existing .editorconfig and .vscode/settings.json. Done means the configuration is visibly available in the chosen location with the listed options and markdown override preserved, or CONTRIBUTING.md documents its package.json location if that option is retained.
Written by the indexing model from the issue text.
Description
Summary
The project has Prettier configuration embedded in package.json but could benefit from having a dedicated .prettierrc file for better visibility and IDE integration.
Current Situation
-
Config exists but is hidden:
- Prettier config is in
package.jsonprettierfield - Contains:
tabWidth: 4,trailingComma: "all",arrowParens: "avoid",printWidth: 100 - Has override for markdown files (tabWidth: 2, printWidth: 80)
- Not immediately visible to contributors browsing the repository
- Prettier config is in
-
Current configuration (from package.json):
{ "trailingComma": "all", "arrowParens": "avoid", "printWidth": 100, "tabWidth": 4, "endOfLine": "auto", "overrides": [ { "files": ["*.md"], "options": { "tabWidth": 2, "printWidth": 80 } } ] } -
IDE integration challenges:
- Some IDEs prefer
.prettierrcover package.json config - Contributors may not discover config buried in package.json
- Tooling integration works better with dedicated config file
- Some IDEs prefer
Proposed Changes
Option 1: Extract to .prettierrc (Recommended)
Move the Prettier config from package.json to a dedicated .prettierrc file.
Option 2: Keep in package.json
If the team prefers package.json config, add documentation in CONTRIBUTING.md pointing to the config location.
Benefits of Dedicated .prettierrc
- Visibility: Immediately visible in repository root
- Convention: Follows common practice in open-source projects
- IDE support: Better auto-detection by editors and plugins
- Separation of concerns: Config separate from package metadata
References
- Current config: package.json
prettierfield - Formatter: gulp_scripts/formatter.js
- Related: .editorconfig, .vscode/settings.json
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 295
- Avg merge
- 11h 17m
- Merged PRs (30d)
- 24
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/vscode-react-native
-
enhancement follow-up
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
microsoft/vscode-react-native#2951 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
microsoft/vscode-react-native#2933 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
microsoft/vscode-react-native#2929 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
microsoft/vscode-react-native#2914 ·
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 72/100
microsoft/vscode-react-native#2957 ·
All issues in microsoft/vscode-react-native
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
danielmiessler/LifeOS#2218 ·