Skip to content

fix(parse/html): fix disabled vue error message#9879

Merged
dyc3 merged 1 commit intomainfrom
dyc3/fix-disabled-vue-message
Apr 9, 2026
Merged

fix(parse/html): fix disabled vue error message#9879
dyc3 merged 1 commit intomainfrom
dyc3/fix-disabled-vue-message

Conversation

@dyc3
Copy link
Copy Markdown
Contributor

@dyc3 dyc3 commented Apr 9, 2026

Summary

Tweaked the vue disabled error message to no longer reference a parser option that is not exposed publicly.

related to #8415

Test Plan

snapshots

Docs

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 9, 2026

🦋 Changeset detected

Latest commit: 55184f0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
Name Type
@biomejs/biome Patch
@biomejs/cli-win32-x64 Patch
@biomejs/cli-win32-arm64 Patch
@biomejs/cli-darwin-x64 Patch
@biomejs/cli-darwin-arm64 Patch
@biomejs/cli-linux-x64 Patch
@biomejs/cli-linux-arm64 Patch
@biomejs/cli-linux-x64-musl Patch
@biomejs/cli-linux-arm64-musl Patch
@biomejs/wasm-web Patch
@biomejs/wasm-bundler Patch
@biomejs/wasm-nodejs Patch
@biomejs/backend-jsonrpc Patch

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

@github-actions github-actions Bot added A-Parser Area: parser A-Formatter Area: formatter L-HTML Language: HTML and super languages labels Apr 9, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 9, 2026

Walkthrough

This change updates the HTML parser's Vue-related diagnostic messages to be accurate. The original error message referenced a non-existent html.parser.vue configuration option that didn't exist yet. The fix replaces the misleading hint with clearer guidance, informing users that inline Vue syntax in HTML files isn't currently supported and suggesting they either remove the syntax or use a proper .vue file extension instead.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: fixing the disabled Vue error message in the HTML parser.
Description check ✅ Passed The description clearly explains the motivation (removing reference to a non-exposed parser option) and relates to the changeset modifications.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dyc3/fix-disabled-vue-message

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
crates/biome_html_parser/src/syntax/parse_error.rs (1)

113-114: Please remove the stale TODO + commented-out diagnostic.

Keeping this commented block around is now confusing, since this fix explicitly avoids pointing users at that option.

♻️ Proposed tidy-up
 pub(crate) fn disabled_vue(p: &HtmlParser, range: TextRange) -> ParseDiagnostic {
-    // TODO: uncomment when the parser option is implemented
-    // p.err_builder("Vue syntax isn't enabled. Is this supposed to be a .vue file?", range).with_hint(markup!("Remove it or enable the parsing using the "<Emphasis>"html.parser.vue"</Emphasis>" option."))
     p.err_builder("Vue syntax isn't enabled. Is this supposed to be a .vue file? HTML-as-Vue is not yet supported.", range).with_hint(markup!("Remove it or rename this file to have the "<Emphasis>".vue"</Emphasis>" file extension."))
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/biome_html_parser/src/syntax/parse_error.rs` around lines 113 - 114,
Remove the stale TODO and the commented-out diagnostic lines that reference
p.err_builder(...).with_hint(markup!(...)) (including the Emphasis and the
literal "html.parser.vue") from parse_error.rs so the code no longer contains
the confusing commented block; simply delete the two commented lines and the
TODO comment so the file contains no leftover reference to the old Vue-syntax
hint.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.changeset/funny-geese-refuse.md:
- Line 5: Replace the current sentence on line 5 so it follows changeset policy:
start with "Fixed [`#ISSUE_NUMBER`](issue link):", remove the forward-looking
"2.5" claim, correct "non-existant" to "non-existent", and avoid
developer-facing details by describing the user-facing fix (e.g., "Fixed
[`#NNN`](link): error message referenced non-existent `html.parser.vue` option
when Vue syntax was disabled"). Ensure the sentence uses the required issue-link
format and is written for end users.

In `@crates/biome_html_parser/src/syntax/parse_error.rs`:
- Around line 112-116: The user-facing diagnostic string in disabled_vue
(function disabled_vue) was changed but no test snapshots were updated; add or
update parser snapshot tests that exercise the Vue-disabled diagnostic so they
lock the new message and hint ("Vue syntax isn't enabled. Is this supposed to be
a .vue file? HTML-as-Vue is not yet supported." and the hint about renaming to
".vue"), e.g. add a parser fixture that triggers disabled_vue and refresh the
corresponding snapshot file(s) used by the parser tests (the parser error
fixtures / snapshots for HTML/Vue cases) so CI captures the updated diagnostic
text and hint; ensure the test asserts the full diagnostic message and hint
exactly as emitted by disabled_vue.

---

Nitpick comments:
In `@crates/biome_html_parser/src/syntax/parse_error.rs`:
- Around line 113-114: Remove the stale TODO and the commented-out diagnostic
lines that reference p.err_builder(...).with_hint(markup!(...)) (including the
Emphasis and the literal "html.parser.vue") from parse_error.rs so the code no
longer contains the confusing commented block; simply delete the two commented
lines and the TODO comment so the file contains no leftover reference to the old
Vue-syntax hint.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6b999cd1-cd37-4416-b8a1-76f4173b30de

📥 Commits

Reviewing files that changed from the base of the PR and between de6210f and 55184f0.

⛔ Files ignored due to path filters (4)
  • crates/biome_html_formatter/tests/specs/prettier/vue/html-vue/upper-case-2.html.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_formatter/tests/specs/prettier/vue/html-vue/upper-case-html-tag-2.html.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_formatter/tests/specs/prettier/vue/html-vue/upper-case-html-tag-4.html.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_formatter/tests/specs/prettier/vue/vue/template-dom.html.snap is excluded by !**/*.snap and included by **
📒 Files selected for processing (2)
  • .changeset/funny-geese-refuse.md
  • crates/biome_html_parser/src/syntax/parse_error.rs

Comment thread .changeset/funny-geese-refuse.md
Comment thread crates/biome_html_parser/src/syntax/parse_error.rs
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Apr 9, 2026

Merging this PR will not alter performance

✅ 67 untouched benchmarks
⏩ 189 skipped benchmarks1


Comparing dyc3/fix-disabled-vue-message (55184f0) with main (de6210f)

Open in CodSpeed

Footnotes

  1. 189 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@dyc3 dyc3 merged commit ce7e2b7 into main Apr 9, 2026
18 checks passed
@dyc3 dyc3 deleted the dyc3/fix-disabled-vue-message branch April 9, 2026 12:34
@github-actions github-actions Bot mentioned this pull request Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Formatter Area: formatter A-Parser Area: parser L-HTML Language: HTML and super languages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant