-
-
Notifications
You must be signed in to change notification settings - Fork 105
chore: format on save using Prettier in VS Code #699
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
WalkthroughAdded VSCode workspace settings to enable format-on-save and set Prettier as the default formatter for TypeScript, JavaScript, and JSON. Existing Prettier and TypeScript settings remain unchanged. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
commit: |
9c59b4b
to
ea3c0a6
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #699 +/- ##
=======================================
Coverage 60.90% 60.90%
=======================================
Files 36 36
Lines 3379 3379
Branches 618 618
=======================================
Hits 2058 2058
Misses 1314 1314
Partials 7 7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
.vscode/settings.json (3)
7-7
: Reduce churn with formatOnSaveMode=modificationsThis limits formatting to changed lines when supported, minimizing noisy diffs.
"editor.formatOnSave": true, + "editor.formatOnSaveMode": "modifications",
8-13
: Cover React flavors too (TSX/JSX)Add typescriptreact and javascriptreact to keep Prettier consistent across TSX/JSX.
"[typescript]": { "editor.defaultFormatter": "esbenp.prettier-vscode", }, + "[typescriptreact]": { + "editor.defaultFormatter": "esbenp.prettier-vscode", + }, "[javascript]": { "editor.defaultFormatter": "esbenp.prettier-vscode", }, + "[javascriptreact]": { + "editor.defaultFormatter": "esbenp.prettier-vscode", + },
14-17
: Also apply to jsonc (VSCode config, tsconfig with comments)settings.json and many config files are jsonc in VS Code; set Prettier for jsonc too.
"[json]": { "editor.defaultFormatter": "esbenp.prettier-vscode", }, + "[jsonc]": { + "editor.defaultFormatter": "esbenp.prettier-vscode", + },
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these settings in your CodeRabbit configuration.
📒 Files selected for processing (1)
.vscode/settings.json
(1 hunks)
🔇 Additional comments (1)
.vscode/settings.json (1)
7-17
: LGTM: Format-on-save with Prettier matches the PR goalEnabling format-on-save and setting Prettier as the default formatter for JS/TS/JSON aligns with the PR objective. No functional risk.
Enabled "Format on save" and sets Prettier to be the default formatter for JS/TS/JSON.
Summary by CodeRabbit