microsoft / microsoft/vscode-react-native
[Feature] Add Prettier configuration file to codify formatting rules
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 295
- Avg merge
- 11h 17m
- Merged PRs (30d)
- 24
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
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.
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.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 74/100