-
-
Couldn't load subscription status.
- Fork 732
feat(htmlish): implement indentScriptAndStyle option
#7333
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
Conversation
🦋 Changeset detectedLatest commit: facff75 The changes in this PR will be included in the next version bump. This PR includes changesets to release 14 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughAdds html.formatter.indentScriptAndStyle (default false) for Vue and Svelte and wires a new Prettier migration field (vue_indent_script_and_style) into the CLI → biome_configuration conversion. Vue and Svelte handlers now obtain HtmlLanguage format options and use indent_script_and_style to control print_with_indent. Adds DocumentFileSource::to_htmlish to map embedded JS sources to HTML-like variants and implements Deref for IndentScriptAndStyle. Includes tests covering default, CLI-flag and config-driven indentation for .vue and .svelte and registers the new test module. Possibly related PRs
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. 📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. ⛔ Files ignored due to path filters (11)
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (18)
✨ 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
Status, Documentation and Community
|
5baf71d to
facff75
Compare
CodSpeed Performance ReportMerging #7333 will not alter performanceComparing Summary
|
We don't guarantee Prettier's defaults in Biome (see indentation style). So what's your preference @dyc3 ? I honestly prefer the indentation by default |
|
My personal preference is unindented because otherwise it's just more line width being consumed and I can't have as much code on screen side by side without word wrapping. Also, at a glance it appears that not a whole lot of people enable the option: https://github.com/search?q=path%3A**%2F.prettierrc+%22vueIndentScriptAndStyle%5C%22%3A+true%22&type=code (3.3k hits for true vs 5.4k hits for explicit false, the rest use the default, which is false) Having it be false by default also makes this less disruptive for our users when upgrading, and we don't have to have a migration for it. The migration rule to preserve existing behavior would have to be present for the next minor, and then probably removed in the next minor. Imagine a scenario where a user upgrades 2.2 -> 2.3, decides to opt in to the default behavior by removing the configuration, and then on upgrading from 2.3 -> 2.4 the migration adds the configuration back. Ultimately, having it be false by default is more in line with biome's goal of having "good defaults" and its just less work for us to do. |
|
Makes sense! Thank you |
Summary
This PR implements the actual functionality behind the
indentScriptAndStyleconfiguration for vue and svelte files.Test Plan
Added tests. Also, Pretter's default for this option is
false, so we align with that.Docs
biomejs/website#3007