Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@dyc3
Copy link
Contributor

@dyc3 dyc3 commented Nov 10, 2025

Summary

This is an exact port of https://eslint.vuejs.org/rules/valid-v-bind.html

It also does some of the plumbing needed to create new html lint rules.

Test Plan

Added snapshot tests, which were generated by AI

Docs

@changeset-bot
Copy link

changeset-bot bot commented Nov 10, 2025

🦋 Changeset detected

Latest commit: db1b096

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-Linter Area: linter A-Tooling Area: internal tools A-Diagnostic Area: diagnostocis L-HTML Language: HTML and super languages labels Nov 10, 2025
@dyc3 dyc3 force-pushed the dyc3/no-vue-invalid-v-bind branch from 04a0aed to a8ab862 Compare November 10, 2025 13:39
@codspeed-hq
Copy link

codspeed-hq bot commented Nov 10, 2025

CodSpeed Performance Report

Merging #8060 will not alter performance

Comparing dyc3/no-vue-invalid-v-bind (db1b096) with main (e403868)

Summary

✅ 58 untouched
⏩ 95 skipped1

Footnotes

  1. 95 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.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 10, 2025

Parser conformance results on

js/262

Test result main count This PR count Difference
Total 51090 51090 0
Passed 49877 49877 0
Failed 1171 1171 0
Panics 42 42 0
Coverage 97.63% 97.63% 0.00%

jsx/babel

Test result main count This PR count Difference
Total 40 40 0
Passed 37 37 0
Failed 3 3 0
Panics 0 0 0
Coverage 92.50% 92.50% 0.00%

symbols/microsoft

Test result main count This PR count Difference
Total 6321 6321 0
Passed 2106 2106 0
Failed 4215 4215 0
Panics 0 0 0
Coverage 33.32% 33.32% 0.00%

ts/babel

Test result main count This PR count Difference
Total 835 835 0
Passed 742 742 0
Failed 93 93 0
Panics 0 0 0
Coverage 88.86% 88.86% 0.00%

ts/microsoft

Test result main count This PR count Difference
Total 18814 18814 0
Passed 14065 14065 0
Failed 4748 4748 0
Panics 1 1 0
Coverage 74.76% 74.76% 0.00%

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 10, 2025

Walkthrough

Adds a new Vue nursery lint rule UseVueValidVBind (detects missing values/arguments and invalid modifiers) with options and test fixtures; registers a nursery lint group in the HTML analyzer; extends test discovery to include .vue files and makes HTML parsing use the detected source type; threads a rule_language parameter through the rules_check test runner and assertions to allow HTML-specific handling; adds Html to xtask codegen LanguageKind and generates HTML rule templates; small justfile, changeset and comment tweaks.

Possibly related PRs

Suggested reviewers

  • mdevils
  • arendjr

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarises the main change: adding a new Vue lint rule useVueValidVBind to the HTML analyser.
Description check ✅ Passed The description explains the motivation (porting an ESLint rule), mentions the plumbing work, and notes that tests were AI-generated, all directly relevant to the changeset.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dyc3/no-vue-invalid-v-bind

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

Copy link
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: 1

🧹 Nitpick comments (2)
xtask/codegen/src/generate_new_analyzer_rule.rs (1)

423-423: Consider a more specific default Query type.

Using HtmlRoot as the template's default Query type means every generated rule will match the entire document once. Most HTML lint rules target specific elements or attributes, not the document root. Consider using a more typical node type like HtmlElement or HtmlAttribute as the template default to better guide rule authors.

Compare with other templates: Js uses JsIdentifierBinding, Css uses CssDeclarationOrRuleBlock, Json uses JsonMember.

crates/biome_html_analyze/src/lint/nursery/no_vue_invalid_v_bind.rs (1)

13-14: Clarify the documentation wording.

Line 13 says "does not have that attribute value", which is a bit confusing. It should more clearly state "does not have an argument" or "is missing a binding value expression", since the example shows a directive without a value expression (e.g., <div v-bind:aaa></div>).

Apply this diff to improve clarity:

-    /// - The directive does not have that attribute value. E.g. <div v-bind:aaa></div>
+    /// - The directive is missing a binding value expression. E.g. <div v-bind:aaa></div>
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a3a713d and a8ab862.

⛔ Files ignored due to path filters (5)
  • Cargo.lock is excluded by !**/*.lock and included by **
  • crates/biome_diagnostics_categories/src/categories.rs is excluded by !**/categories.rs and included by **
  • crates/biome_html_analyze/src/lint/nursery.rs is excluded by !**/nursery.rs and included by **
  • crates/biome_html_analyze/tests/specs/nursery/noVueInvalidVBind/invalid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/noVueInvalidVBind/valid.vue.snap is excluded by !**/*.snap and included by **
📒 Files selected for processing (11)
  • .changeset/tall-jokes-send.md (1 hunks)
  • crates/biome_html_analyze/Cargo.toml (1 hunks)
  • crates/biome_html_analyze/src/lint.rs (1 hunks)
  • crates/biome_html_analyze/src/lint/nursery/no_vue_invalid_v_bind.rs (1 hunks)
  • crates/biome_html_analyze/tests/spec_tests.rs (3 hunks)
  • crates/biome_html_analyze/tests/specs/nursery/noVueInvalidVBind/invalid.vue (1 hunks)
  • crates/biome_html_analyze/tests/specs/nursery/noVueInvalidVBind/valid.vue (1 hunks)
  • crates/biome_rule_options/src/lib.rs (1 hunks)
  • crates/biome_rule_options/src/no_vue_invalid_v_bind.rs (1 hunks)
  • justfile (1 hunks)
  • xtask/codegen/src/generate_new_analyzer_rule.rs (4 hunks)
🧰 Additional context used
🧠 Learnings (30)
📚 Learning: 2025-10-15T09:23:33.055Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_type_info/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:23:33.055Z
Learning: Applies to crates/biome_js_type_info/biome_module_graph/src/**/*.rs : Do not copy or clone data between module graph entries (including behind Arc). Each module must avoid holding duplicated data from another module to enable simple invalidation.

Applied to files:

  • crates/biome_rule_options/src/lib.rs
📚 Learning: 2025-10-15T09:23:33.055Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_type_info/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:23:33.055Z
Learning: Applies to crates/biome_js_type_info/src/type_info.rs : Add new TypeScript type support by extending the TypeData enum rather than introducing parallel structures.

Applied to files:

  • crates/biome_rule_options/src/no_vue_invalid_v_bind.rs
  • crates/biome_html_analyze/tests/spec_tests.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/tests/spec_tests.rs : In tests/spec_tests.rs, generate tests with `tests_macros::gen_tests! {"tests/specs/html/**/*.html", crate::spec_test::run, ""}`

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/tests/specs/html/**/*.html : Place HTML test cases under tests/specs/html as .html files discovered by the test macro

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/tests/** : Create a tests directory containing a specs subfolder and the files spec_test.rs, spec_tests.rs, and language.rs

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/../biome_lsp/src/server.tests.rs : Keep end-to-end LSP tests in ../biome_lsp/src/server.tests.rs

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
  • crates/biome_html_analyze/Cargo.toml
  • crates/biome_html_analyze/src/lint.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/tests/language.rs : Create tests/language.rs defining `HtmlTestFormatLanguage` and implement the TestFormatLanguage trait

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace/watcher.tests.rs : Place watcher tests related to workspace methods in src/workspace/watcher.tests.rs

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
  • crates/biome_html_analyze/Cargo.toml
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/tests/spec_test.rs : Implement a `run` function in tests/spec_test.rs that wires SpecSnapshot and includes!("language.rs") as shown

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/**/*.rs : After generation, remove usages of `format_verbatim_node` and implement real formatting with biome_formatter utilities

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
  • crates/biome_html_analyze/Cargo.toml
  • crates/biome_html_analyze/src/lint.rs
📚 Learning: 2025-10-15T09:23:33.055Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_type_info/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:23:33.055Z
Learning: Applies to crates/biome_js_type_info/src/{type_info,local_inference,resolver,flattening}.rs : Avoid recursive type structures and cross-module Arcs; represent links between types using TypeReference and TypeData::Reference.

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/cst.rs : Create FormatHtmlSyntaxNode in cst.rs implementing FormatRule<HtmlSyntaxNode> and AsFormat/IntoFormat for HtmlSyntaxNode using the provided plumbing

Applied to files:

  • justfile
  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:22:46.002Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:46.002Z
Learning: Applies to crates/biome_js_formatter/**/Cargo.toml : Declare the dependency `biome_js_formatter = { version = "0.0.1", path = "../biome_js_formatter" }` for internal installation

Applied to files:

  • crates/biome_html_analyze/Cargo.toml
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace.rs : Implement and expose the Workspace trait in src/workspace.rs

Applied to files:

  • crates/biome_html_analyze/Cargo.toml
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Applies to crates/biome_parser/crates/biome_*_{syntax,factory}/** : Create per-language crates biome_<lang>_syntax and biome_<lang>_factory under crates/

Applied to files:

  • crates/biome_html_analyze/Cargo.toml
  • crates/biome_html_analyze/src/lint.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/**/Cargo.toml : Add the specified dev-dependencies under [dev-dependencies] for the test infrastructure

Applied to files:

  • crates/biome_html_analyze/Cargo.toml
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Applies to crates/biome_parser/crates/biome_*_{syntax,factory}/src/generated/** : Each new biome_<lang>_{syntax,factory} crate must have a src/generated/ directory for codegen output

Applied to files:

  • crates/biome_html_analyze/Cargo.toml
  • crates/biome_html_analyze/src/lint.rs
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace/server.rs : WorkspaceServer must maintain workspace state and is used in the daemon and CLI daemonless mode

Applied to files:

  • crates/biome_html_analyze/Cargo.toml
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace_watcher.rs : WorkspaceWatcher should synchronize workspace state with the filesystem and be active only in daemon mode (not used by the CLI)

Applied to files:

  • crates/biome_html_analyze/Cargo.toml
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Add a new LanguageKind variant (e.g., Html) in language_kind.rs and implement/cover all methods

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/lib.rs : Implement FormatLanguage for HtmlFormatLanguage with associated types: SyntaxLanguage=HtmlLanguage, Context=HtmlFormatContext, FormatRule=FormatHtmlSyntaxNode

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Add a new language prefix (e.g., html_) to LANGUAGE_PREFIXES in language_kind.rs

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Applies to crates/biome_parser/xtask/codegen/src/*_kinds_src.rs : Add src/<lang>_kinds_src.rs under xtask/codegen that returns a static KindSrc

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
  • crates/biome_html_analyze/src/lint.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/comments.rs : Expose a public HtmlComments type alias: `pub type HtmlComments = Comments<HtmlLanguage>;`

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Run cargo codegen grammar after covering all LanguageKind variants

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Applies to crates/biome_parser/xtask/codegen/*.ungram : All node names in grammar must start with the language prefix (e.g., HtmlSimpleAttribute)

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/lib.rs : Define the HtmlFormatter type alias: `type HtmlFormatter<'buf> = Formatter<'buf, HtmlFormatContext>;`

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/comments.rs : Define HtmlCommentStyle implementing CommentStyle in comments.rs

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:21:24.116Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_diagnostics/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:21:24.116Z
Learning: Applies to crates/biome_diagnostics/crates/biome_diagnostics_categories/src/categories.rs : Register any new diagnostic category in `crates/biome_diagnostics_categories/src/categories.rs`

Applied to files:

  • crates/biome_html_analyze/src/lint.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Applies to crates/biome_parser/crates/**/src/lexer/mod.rs : Create a lexer module at crates/<parser_crate>/src/lexer/mod.rs

Applied to files:

  • crates/biome_html_analyze/src/lint.rs
🧬 Code graph analysis (3)
crates/biome_html_analyze/tests/spec_tests.rs (1)
crates/biome_html_parser/src/lib.rs (1)
  • parse_html (37-40)
crates/biome_html_analyze/src/lint/nursery/no_vue_invalid_v_bind.rs (3)
packages/@biomejs/backend-jsonrpc/src/workspace.ts (2)
  • RuleDomain (927-935)
  • TextRange (9414-9414)
crates/biome_analyze/src/rule.rs (4)
  • recommended (602-605)
  • domains (632-635)
  • sources (617-620)
  • same (246-251)
crates/biome_html_factory/src/generated/node_factory.rs (1)
  • vue_directive (584-591)
crates/biome_html_analyze/src/lint.rs (1)
packages/@biomejs/backend-jsonrpc/src/workspace.ts (2)
  • A11y (1043-1196)
  • Nursery (1662-1799)
⏰ 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). (21)
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Check Dependencies
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: Test Node.js API
  • GitHub Check: Bench (biome_module_graph)
  • GitHub Check: Bench (biome_json_analyze)
  • GitHub Check: Bench (biome_json_formatter)
  • GitHub Check: Bench (biome_json_parser)
  • GitHub Check: Bench (biome_tailwind_parser)
  • GitHub Check: Bench (biome_graphql_parser)
  • GitHub Check: Bench (biome_graphql_formatter)
  • GitHub Check: Bench (biome_css_parser)
  • GitHub Check: Parser conformance
  • GitHub Check: Bench (biome_css_formatter)
  • GitHub Check: Bench (biome_package)
  • GitHub Check: Bench (biome_css_analyze)
  • GitHub Check: Bench (biome_js_parser)
  • GitHub Check: Bench (biome_js_formatter)
  • GitHub Check: Bench (biome_js_analyze)
  • GitHub Check: Bench (biome_configuration)
  • GitHub Check: autofix
🔇 Additional comments (15)
justfile (1)

106-109: LGTM!

The HTML lint rule generator follows the established pattern for other languages. Consistent and correct.

xtask/codegen/src/generate_new_analyzer_rule.rs (2)

12-12: LGTM!

Html variant properly integrated into LanguageKind enum and its conversions.

Also applies to: 22-22, 35-35


356-380: Good addition of scaffolding!

Adding the run and diagnostic function bodies for GraphQL rules improves the template completeness.

crates/biome_html_analyze/Cargo.toml (1)

22-22: LGTM!

Necessary dependency for the rule options support.

.changeset/tall-jokes-send.md (1)

1-5: LGTM!

Changeset properly documents the new rule.

crates/biome_rule_options/src/lib.rs (1)

246-246: LGTM!

Module export properly placed in alphabetical order.

crates/biome_html_analyze/tests/spec_tests.rs (2)

16-17: Good addition of Vue file support!

Extending test discovery to include Vue files enables testing of Vue-specific lint rules.


97-97: Correct use of source_type!

Properly passing the detected source type to the parser enables Vue-specific parsing behaviour.

crates/biome_html_analyze/tests/specs/nursery/noVueInvalidVBind/invalid.vue (1)

1-27: Excellent test coverage!

The test fixture thoroughly covers various invalid v-bind scenarios including missing arguments, invalid modifiers, and both long-form and shorthand syntax. Well-documented with clear comments.

crates/biome_html_analyze/src/lint.rs (1)

6-7: LGTM!

Nursery module and group properly integrated into the lint category.

crates/biome_html_analyze/tests/specs/nursery/noVueInvalidVBind/valid.vue (1)

1-32: Excellent test coverage!

The valid test cases are comprehensive and well-documented. They cover all the key scenarios: basic bindings (long-form and shorthand), all valid modifiers, combined modifiers, dynamic arguments, and edge cases like kebab-case attributes.

crates/biome_rule_options/src/no_vue_invalid_v_bind.rs (1)

1-6: LGTM! Standard empty options pattern.

The empty options struct follows the established pattern for rules without configurable options. All derives and serde attributes are appropriate.

crates/biome_html_analyze/src/lint/nursery/no_vue_invalid_v_bind.rs (3)

47-82: Solid implementation!

The rule logic correctly handles both long-form v-bind: and shorthand : directives. The filtering by directive name, missing argument detection, and invalid modifier validation all look correct.

The comment on line 72 about the parser catching missing arguments for shorthand syntax is a helpful clarification.


84-115: Clear and helpful diagnostics!

Both diagnostic messages provide good context and actionable guidance. The examples and notes will help users quickly understand and fix the issues.


40-40: VALID_MODIFIERS and helper function look correct.

The list of valid modifiers matches the ESLint rule specification, and the find_invalid_modifiers helper correctly identifies invalid modifiers by returning the range of the first offending modifier.

Also applies to: 117-124

@dyc3 dyc3 force-pushed the dyc3/no-vue-invalid-v-bind branch from 2cddaf8 to 8b46f75 Compare November 10, 2025 13:46
Copy link
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: 1

🧹 Nitpick comments (1)
crates/biome_html_analyze/src/lint/nursery/no_vue_invalid_v_bind.rs (1)

34-34: Consider deferring recommended: true until after the nursery period.

Nursery rules typically remain recommended: false until they've been thoroughly tested and promoted to a stable group.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a8ab862 and 8b46f75.

⛔ Files ignored due to path filters (5)
  • Cargo.lock is excluded by !**/*.lock and included by **
  • crates/biome_diagnostics_categories/src/categories.rs is excluded by !**/categories.rs and included by **
  • crates/biome_html_analyze/src/lint/nursery.rs is excluded by !**/nursery.rs and included by **
  • crates/biome_html_analyze/tests/specs/nursery/noVueInvalidVBind/invalid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/noVueInvalidVBind/valid.vue.snap is excluded by !**/*.snap and included by **
📒 Files selected for processing (11)
  • .changeset/tall-jokes-send.md (1 hunks)
  • crates/biome_html_analyze/Cargo.toml (1 hunks)
  • crates/biome_html_analyze/src/lint.rs (1 hunks)
  • crates/biome_html_analyze/src/lint/nursery/no_vue_invalid_v_bind.rs (1 hunks)
  • crates/biome_html_analyze/tests/spec_tests.rs (2 hunks)
  • crates/biome_html_analyze/tests/specs/nursery/noVueInvalidVBind/invalid.vue (1 hunks)
  • crates/biome_html_analyze/tests/specs/nursery/noVueInvalidVBind/valid.vue (1 hunks)
  • crates/biome_rule_options/src/lib.rs (1 hunks)
  • crates/biome_rule_options/src/no_vue_invalid_v_bind.rs (1 hunks)
  • justfile (1 hunks)
  • xtask/codegen/src/generate_new_analyzer_rule.rs (4 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • .changeset/tall-jokes-send.md
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_html_analyze/src/lint.rs
  • crates/biome_html_analyze/tests/specs/nursery/noVueInvalidVBind/valid.vue
🧰 Additional context used
🧠 Learnings (27)
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/tests/spec_tests.rs : In tests/spec_tests.rs, generate tests with `tests_macros::gen_tests! {"tests/specs/html/**/*.html", crate::spec_test::run, ""}`

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/tests/specs/html/**/*.html : Place HTML test cases under tests/specs/html as .html files discovered by the test macro

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/../biome_lsp/src/server.tests.rs : Keep end-to-end LSP tests in ../biome_lsp/src/server.tests.rs

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
  • crates/biome_html_analyze/Cargo.toml
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/tests/spec_test.rs : Implement a `run` function in tests/spec_test.rs that wires SpecSnapshot and includes!("language.rs") as shown

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/tests/** : Create a tests directory containing a specs subfolder and the files spec_test.rs, spec_tests.rs, and language.rs

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace/watcher.tests.rs : Place watcher tests related to workspace methods in src/workspace/watcher.tests.rs

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
  • crates/biome_html_analyze/Cargo.toml
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/tests/language.rs : Create tests/language.rs defining `HtmlTestFormatLanguage` and implement the TestFormatLanguage trait

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:23:33.055Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_type_info/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:23:33.055Z
Learning: Applies to crates/biome_js_type_info/src/type_info.rs : Add new TypeScript type support by extending the TypeData enum rather than introducing parallel structures.

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
  • crates/biome_rule_options/src/no_vue_invalid_v_bind.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/**/*.rs : After generation, remove usages of `format_verbatim_node` and implement real formatting with biome_formatter utilities

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
  • crates/biome_html_analyze/Cargo.toml
📚 Learning: 2025-10-15T09:23:33.055Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_type_info/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:23:33.055Z
Learning: Applies to crates/biome_js_type_info/src/{type_info,local_inference,resolver,flattening}.rs : Avoid recursive type structures and cross-module Arcs; represent links between types using TypeReference and TypeData::Reference.

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
📚 Learning: 2025-10-15T09:22:46.002Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:46.002Z
Learning: Applies to crates/biome_js_formatter/**/*.rs : Use `dbg_write!` to debug and inspect the emitted IR during formatting

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
📚 Learning: 2025-10-15T09:22:46.002Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:46.002Z
Learning: Applies to crates/biome_js_formatter/**/Cargo.toml : Declare the dependency `biome_js_formatter = { version = "0.0.1", path = "../biome_js_formatter" }` for internal installation

Applied to files:

  • crates/biome_html_analyze/Cargo.toml
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace.rs : Implement and expose the Workspace trait in src/workspace.rs

Applied to files:

  • crates/biome_html_analyze/Cargo.toml
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Applies to crates/biome_parser/crates/biome_*_{syntax,factory}/** : Create per-language crates biome_<lang>_syntax and biome_<lang>_factory under crates/

Applied to files:

  • crates/biome_html_analyze/Cargo.toml
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/**/Cargo.toml : Add the specified dev-dependencies under [dev-dependencies] for the test infrastructure

Applied to files:

  • crates/biome_html_analyze/Cargo.toml
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Applies to crates/biome_parser/crates/biome_*_{syntax,factory}/src/generated/** : Each new biome_<lang>_{syntax,factory} crate must have a src/generated/ directory for codegen output

Applied to files:

  • crates/biome_html_analyze/Cargo.toml
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Add a new LanguageKind variant (e.g., Html) in language_kind.rs and implement/cover all methods

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/lib.rs : Implement FormatLanguage for HtmlFormatLanguage with associated types: SyntaxLanguage=HtmlLanguage, Context=HtmlFormatContext, FormatRule=FormatHtmlSyntaxNode

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/cst.rs : Create FormatHtmlSyntaxNode in cst.rs implementing FormatRule<HtmlSyntaxNode> and AsFormat/IntoFormat for HtmlSyntaxNode using the provided plumbing

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
  • justfile
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Applies to crates/biome_parser/xtask/codegen/src/*_kinds_src.rs : Add src/<lang>_kinds_src.rs under xtask/codegen that returns a static KindSrc

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Add a new language prefix (e.g., html_) to LANGUAGE_PREFIXES in language_kind.rs

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/comments.rs : Expose a public HtmlComments type alias: `pub type HtmlComments = Comments<HtmlLanguage>;`

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Run cargo codegen grammar after covering all LanguageKind variants

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Applies to crates/biome_parser/xtask/codegen/*.ungram : All node names in grammar must start with the language prefix (e.g., HtmlSimpleAttribute)

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Applies to crates/biome_parser/xtask/codegen/*.ungram : Bogus nodes must be part of a variant/union (e.g., AnyHtmlAttribute includes HtmlBogusAttribute)

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/lib.rs : Define the HtmlFormatter type alias: `type HtmlFormatter<'buf> = Formatter<'buf, HtmlFormatContext>;`

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/comments.rs : Define HtmlCommentStyle implementing CommentStyle in comments.rs

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
🧬 Code graph analysis (2)
crates/biome_html_analyze/tests/spec_tests.rs (1)
crates/biome_html_parser/src/lib.rs (1)
  • parse_html (37-40)
crates/biome_html_analyze/src/lint/nursery/no_vue_invalid_v_bind.rs (2)
packages/@biomejs/backend-jsonrpc/src/workspace.ts (1)
  • RuleDomain (927-935)
crates/biome_analyze/src/rule.rs (4)
  • recommended (602-605)
  • domains (632-635)
  • sources (617-620)
  • same (246-251)
⏰ 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)
  • GitHub Check: Test Node.js API
  • GitHub Check: Bench (biome_module_graph)
  • GitHub Check: Bench (biome_json_analyze)
  • GitHub Check: autofix
  • GitHub Check: Bench (biome_json_parser)
  • GitHub Check: Bench (biome_json_formatter)
  • GitHub Check: Bench (biome_tailwind_parser)
  • GitHub Check: Parser conformance
  • GitHub Check: Bench (biome_configuration)
  • GitHub Check: Bench (biome_js_formatter)
  • GitHub Check: Bench (biome_graphql_formatter)
  • GitHub Check: Bench (biome_package)
  • GitHub Check: Bench (biome_js_parser)
  • GitHub Check: Bench (biome_graphql_parser)
  • GitHub Check: Bench (biome_js_analyze)
  • GitHub Check: Bench (biome_css_parser)
  • GitHub Check: Bench (biome_css_analyze)
  • GitHub Check: Bench (biome_css_formatter)
🔇 Additional comments (11)
crates/biome_html_analyze/Cargo.toml (1)

22-22: LGTM!

The workspace dependency addition is correct and necessary for the new rule options.

justfile (1)

106-109: LGTM!

The HTML lint rule generator follows the established pattern for other languages.

xtask/codegen/src/generate_new_analyzer_rule.rs (2)

12-12: LGTM!

The HTML language variant is properly integrated into the LanguageKind enum with complete string conversion support.

Also applies to: 22-22, 35-35


384-456: LGTM!

The HTML rule template is well-structured and consistent with other language templates. Uses HtmlRoot as the query type and includes appropriate boilerplate for diagnostics.

crates/biome_html_analyze/tests/spec_tests.rs (2)

16-17: LGTM!

Adding .vue file support to test discovery is necessary for the new Vue-specific lint rule.


96-96: LGTM!

Using the actual source type instead of default options is correct—Vue files require different parse options than plain HTML.

crates/biome_html_analyze/tests/specs/nursery/noVueInvalidVBind/invalid.vue (1)

1-27: LGTM!

The test file provides comprehensive coverage of invalid v-bind scenarios, including edge cases like mixed modifiers and dynamic arguments.

crates/biome_rule_options/src/no_vue_invalid_v_bind.rs (1)

1-6: LGTM!

The options struct follows the standard pattern with appropriate derives, allowing for future extensibility whilst keeping the current rule simple.

crates/biome_html_analyze/src/lint/nursery/no_vue_invalid_v_bind.rs (3)

53-82: LGTM!

The logic correctly handles both VueDirective and VueVBindShorthandDirective forms, properly delegating modifier validation to the helper function.


84-114: LGTM!

The diagnostic messages are clear and actionable, with helpful notes explaining the requirements and providing examples.


117-124: LGTM!

The helper function cleanly validates modifiers and returns the range of the first invalid modifier for precise diagnostics.

@dyc3 dyc3 marked this pull request as draft November 10, 2025 13:55
@github-actions github-actions bot added the A-Project Area: project label Nov 10, 2025
@dyc3 dyc3 force-pushed the dyc3/no-vue-invalid-v-bind branch from dd4767f to f5c5d39 Compare November 10, 2025 21:22
@github-actions github-actions bot added A-Project Area: project and removed A-Project Area: project labels Nov 10, 2025
@dyc3 dyc3 force-pushed the dyc3/no-vue-invalid-v-bind branch 2 times, most recently from 724e7a4 to 46f0b31 Compare November 11, 2025 15:46
@dyc3 dyc3 marked this pull request as ready for review November 11, 2025 15:46
Copy link
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: 0

🧹 Nitpick comments (3)
xtask/rules_check/src/lib.rs (1)

285-293: Consider refactoring the HACK to a proper solution.

Whilst this workaround enables HTML rule testing, the explicit "HACK" comment signals technical debt. The root issue is that test.document_file_source() uses JS-first resolution with experimental HTML support disabled (see biome_ruledoc_utils/src/codeblock.rs:95-98).

The fallback to HtmlFileSource::html() when extension parsing fails might not be appropriate for all tags. Consider verifying that unknown tags should default to plain HTML rather than erroring.

A cleaner long-term solution would be to make document_file_source() language-aware, but that's likely beyond this PR's scope.

xtask/codegen/src/generate_new_analyzer_rule.rs (1)

404-412: Consider a more illustrative example for the template.

The current example shows <div></div> as invalid, but this doesn't clearly demonstrate an "empty block" issue compared to the valid case. A clearer template example might help future rule authors.

Perhaps something like:

 /// ### Invalid
 ///
 /// ```html,expect_diagnostic
-/// <div></div>
+/// <style></style>
 /// ```
 ///
 /// ### Valid
 ///
 /// ```html
-/// <div>foo</div>
+/// <style>body { color: red; }</style>
 /// ```

This better matches the "empty block" diagnostic message, though rule authors will customise this anyway.

crates/biome_html_analyze/src/lint.rs (1)

6-7: LGTM—nursery group registered correctly.

The addition of the nursery module and its registration in the Lint category follows the expected pattern.

Minor note: duplicate comment on lines 1 and 3, though this is generated code.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8b46f75 and 46f0b31.

⛔ Files ignored due to path filters (8)
  • Cargo.lock is excluded by !**/*.lock and included by **
  • crates/biome_configuration/src/analyzer/linter/rules.rs is excluded by !**/rules.rs and included by **
  • crates/biome_diagnostics_categories/src/categories.rs is excluded by !**/categories.rs and included by **
  • crates/biome_html_analyze/src/lint/nursery.rs is excluded by !**/nursery.rs and included by **
  • crates/biome_html_analyze/tests/specs/nursery/noVueInvalidVBind/invalid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/noVueInvalidVBind/valid.vue.snap is excluded by !**/*.snap and included by **
  • packages/@biomejs/backend-jsonrpc/src/workspace.ts is excluded by !**/backend-jsonrpc/src/workspace.ts and included by **
  • packages/@biomejs/biome/configuration_schema.json is excluded by !**/configuration_schema.json and included by **
📒 Files selected for processing (13)
  • .changeset/tall-jokes-send.md (1 hunks)
  • crates/biome_html_analyze/Cargo.toml (1 hunks)
  • crates/biome_html_analyze/src/lint.rs (1 hunks)
  • crates/biome_html_analyze/src/lint/nursery/no_vue_invalid_v_bind.rs (1 hunks)
  • crates/biome_html_analyze/tests/spec_tests.rs (2 hunks)
  • crates/biome_html_analyze/tests/specs/nursery/noVueInvalidVBind/invalid.vue (1 hunks)
  • crates/biome_html_analyze/tests/specs/nursery/noVueInvalidVBind/valid.vue (1 hunks)
  • crates/biome_rule_options/src/lib.rs (1 hunks)
  • crates/biome_rule_options/src/no_vue_invalid_v_bind.rs (1 hunks)
  • crates/biome_ruledoc_utils/src/codeblock.rs (1 hunks)
  • justfile (1 hunks)
  • xtask/codegen/src/generate_new_analyzer_rule.rs (4 hunks)
  • xtask/rules_check/src/lib.rs (6 hunks)
✅ Files skipped from review due to trivial changes (1)
  • crates/biome_ruledoc_utils/src/codeblock.rs
🚧 Files skipped from review as they are similar to previous changes (7)
  • crates/biome_html_analyze/Cargo.toml
  • crates/biome_html_analyze/tests/spec_tests.rs
  • crates/biome_html_analyze/tests/specs/nursery/noVueInvalidVBind/invalid.vue
  • crates/biome_rule_options/src/no_vue_invalid_v_bind.rs
  • .changeset/tall-jokes-send.md
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_html_analyze/src/lint/nursery/no_vue_invalid_v_bind.rs
🧰 Additional context used
🧠 Learnings (18)
📚 Learning: 2025-10-15T09:21:24.116Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_diagnostics/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:21:24.116Z
Learning: Applies to crates/biome_diagnostics/crates/biome_diagnostics_categories/src/categories.rs : Register any new diagnostic category in `crates/biome_diagnostics_categories/src/categories.rs`

Applied to files:

  • crates/biome_html_analyze/src/lint.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Applies to crates/biome_parser/crates/biome_*_{syntax,factory}/** : Create per-language crates biome_<lang>_syntax and biome_<lang>_factory under crates/

Applied to files:

  • crates/biome_html_analyze/src/lint.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/**/*.rs : After generation, remove usages of `format_verbatim_node` and implement real formatting with biome_formatter utilities

Applied to files:

  • crates/biome_html_analyze/src/lint.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Applies to crates/biome_parser/crates/biome_*_{syntax,factory}/src/generated/** : Each new biome_<lang>_{syntax,factory} crate must have a src/generated/ directory for codegen output

Applied to files:

  • crates/biome_html_analyze/src/lint.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Applies to crates/biome_parser/xtask/codegen/src/*_kinds_src.rs : Add src/<lang>_kinds_src.rs under xtask/codegen that returns a static KindSrc

Applied to files:

  • crates/biome_html_analyze/src/lint.rs
  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/../biome_lsp/src/server.tests.rs : Keep end-to-end LSP tests in ../biome_lsp/src/server.tests.rs

Applied to files:

  • crates/biome_html_analyze/src/lint.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/tests/language.rs : Create tests/language.rs defining `HtmlTestFormatLanguage` and implement the TestFormatLanguage trait

Applied to files:

  • xtask/rules_check/src/lib.rs
  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/lib.rs : Implement FormatLanguage for HtmlFormatLanguage with associated types: SyntaxLanguage=HtmlLanguage, Context=HtmlFormatContext, FormatRule=FormatHtmlSyntaxNode

Applied to files:

  • xtask/rules_check/src/lib.rs
  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/tests/spec_test.rs : Implement a `run` function in tests/spec_test.rs that wires SpecSnapshot and includes!("language.rs") as shown

Applied to files:

  • xtask/rules_check/src/lib.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/cst.rs : Create FormatHtmlSyntaxNode in cst.rs implementing FormatRule<HtmlSyntaxNode> and AsFormat/IntoFormat for HtmlSyntaxNode using the provided plumbing

Applied to files:

  • xtask/rules_check/src/lib.rs
  • xtask/codegen/src/generate_new_analyzer_rule.rs
  • justfile
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Add a new LanguageKind variant (e.g., Html) in language_kind.rs and implement/cover all methods

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Add a new language prefix (e.g., html_) to LANGUAGE_PREFIXES in language_kind.rs

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/comments.rs : Expose a public HtmlComments type alias: `pub type HtmlComments = Comments<HtmlLanguage>;`

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Run cargo codegen grammar after covering all LanguageKind variants

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Applies to crates/biome_parser/xtask/codegen/*.ungram : All node names in grammar must start with the language prefix (e.g., HtmlSimpleAttribute)

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Applies to crates/biome_parser/xtask/codegen/*.ungram : Bogus nodes must be part of a variant/union (e.g., AnyHtmlAttribute includes HtmlBogusAttribute)

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/lib.rs : Define the HtmlFormatter type alias: `type HtmlFormatter<'buf> = Formatter<'buf, HtmlFormatContext>;`

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/comments.rs : Define HtmlCommentStyle implementing CommentStyle in comments.rs

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
🧬 Code graph analysis (1)
xtask/rules_check/src/lib.rs (3)
crates/biome_ruledoc_utils/src/codeblock.rs (1)
  • document_file_source (96-99)
crates/biome_js_syntax/src/file_source.rs (1)
  • try_from_extension (337-358)
crates/biome_html_syntax/src/file_source.rs (2)
  • try_from_extension (112-121)
  • html (43-47)
⏰ 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). (26)
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Documentation
  • GitHub Check: End-to-end tests
  • GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: Check Dependencies
  • GitHub Check: Lint project (depot-windows-2022)
  • GitHub Check: Bench (biome_js_parser)
  • GitHub Check: Bench (biome_js_formatter)
  • GitHub Check: Bench (biome_js_analyze)
  • GitHub Check: Check JS Files
  • GitHub Check: Test Node.js API
  • GitHub Check: Bench (biome_package)
  • GitHub Check: Bench (biome_json_analyze)
  • GitHub Check: Bench (biome_json_parser)
  • GitHub Check: Bench (biome_json_formatter)
  • GitHub Check: Bench (biome_tailwind_parser)
  • GitHub Check: Bench (biome_css_analyze)
  • GitHub Check: Bench (biome_css_parser)
  • GitHub Check: autofix
  • GitHub Check: Bench (biome_graphql_formatter)
  • GitHub Check: Bench (biome_module_graph)
  • GitHub Check: Bench (biome_css_formatter)
  • GitHub Check: Parser conformance
  • GitHub Check: Bench (biome_graphql_parser)
  • GitHub Check: Bench (biome_configuration)
🔇 Additional comments (6)
xtask/rules_check/src/lib.rs (3)

268-276: LGTM: Language context propagated correctly.

The addition of rule_language parameter enables language-specific handling in test infrastructure, which aligns with the PR's goal of adding HTML lint rules.


758-758: Correct parameter threading.

The rule language is properly sourced from rule_metadata.language and passed to the TestRunner.


837-862: LGTM: TestRunner updates are consistent.

The new rule_language field is properly initialised in the constructor and correctly passed to assert_lint when running tests. The threading is clean and consistent.

xtask/codegen/src/generate_new_analyzer_rule.rs (1)

12-12: LGTM: Html language variant correctly integrated.

The Html variant is properly added to the enum and its conversion methods, following the established pattern for other languages.

Also applies to: 22-22, 35-35

justfile (1)

106-109: LGTM!

Follows the established pattern for other language lint rule tasks. Consistent implementation.

crates/biome_html_analyze/tests/specs/nursery/noVueInvalidVBind/valid.vue (1)

1-32: Version mismatch detected—clarify which Vue version the rule targets.

The official Vue docs confirm modifiers differ by version: Vue 3 supports .camel, .prop, .attr; Vue 2 supports .camel, .prop, .sync. Your test file includes all four as valid (lines 11, 14), which works only if the rule supports both versions. Please confirm:

  • Does the rule target Vue 3, Vue 2, or both?
  • If both, test cases should indicate version context.

@dyc3 dyc3 force-pushed the dyc3/no-vue-invalid-v-bind branch from 46f0b31 to bdf59be Compare November 11, 2025 16:26
@dyc3 dyc3 changed the title feat(html/analyze): add noVueInvalidVBind feat(html/analyze): add useVueValidVBind Nov 11, 2025
Copy link
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: 1

♻️ Duplicate comments (1)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_bind.rs (1)

44-44: Remove deprecated sync modifier for Vue 3 compatibility.

As noted in the previous review, the sync modifier is not valid in Vue 3. The valid modifiers are .camel, .prop, and .attr.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 46f0b31 and bdf59be.

⛔ Files ignored due to path filters (8)
  • Cargo.lock is excluded by !**/*.lock and included by **
  • crates/biome_configuration/src/analyzer/linter/rules.rs is excluded by !**/rules.rs and included by **
  • crates/biome_diagnostics_categories/src/categories.rs is excluded by !**/categories.rs and included by **
  • crates/biome_html_analyze/src/lint/nursery.rs is excluded by !**/nursery.rs and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVBind/invalid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVBind/valid.vue.snap is excluded by !**/*.snap and included by **
  • packages/@biomejs/backend-jsonrpc/src/workspace.ts is excluded by !**/backend-jsonrpc/src/workspace.ts and included by **
  • packages/@biomejs/biome/configuration_schema.json is excluded by !**/configuration_schema.json and included by **
📒 Files selected for processing (13)
  • .changeset/tall-jokes-send.md (1 hunks)
  • crates/biome_html_analyze/Cargo.toml (1 hunks)
  • crates/biome_html_analyze/src/lint.rs (1 hunks)
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_bind.rs (1 hunks)
  • crates/biome_html_analyze/tests/spec_tests.rs (2 hunks)
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVBind/invalid.vue (1 hunks)
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVBind/valid.vue (1 hunks)
  • crates/biome_rule_options/src/lib.rs (1 hunks)
  • crates/biome_rule_options/src/use_vue_valid_v_bind.rs (1 hunks)
  • crates/biome_ruledoc_utils/src/codeblock.rs (1 hunks)
  • justfile (1 hunks)
  • xtask/codegen/src/generate_new_analyzer_rule.rs (4 hunks)
  • xtask/rules_check/src/lib.rs (6 hunks)
✅ Files skipped from review due to trivial changes (2)
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVBind/valid.vue
  • crates/biome_ruledoc_utils/src/codeblock.rs
🚧 Files skipped from review as they are similar to previous changes (3)
  • crates/biome_html_analyze/tests/spec_tests.rs
  • xtask/rules_check/src/lib.rs
  • crates/biome_rule_options/src/lib.rs
🧰 Additional context used
🧠 Learnings (22)
📚 Learning: 2025-10-15T09:21:24.116Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_diagnostics/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:21:24.116Z
Learning: Applies to crates/biome_diagnostics/crates/biome_diagnostics_categories/src/categories.rs : Register any new diagnostic category in `crates/biome_diagnostics_categories/src/categories.rs`

Applied to files:

  • crates/biome_html_analyze/src/lint.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Applies to crates/biome_parser/crates/biome_*_{syntax,factory}/** : Create per-language crates biome_<lang>_syntax and biome_<lang>_factory under crates/

Applied to files:

  • crates/biome_html_analyze/src/lint.rs
  • crates/biome_html_analyze/Cargo.toml
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/**/*.rs : After generation, remove usages of `format_verbatim_node` and implement real formatting with biome_formatter utilities

Applied to files:

  • crates/biome_html_analyze/src/lint.rs
  • crates/biome_html_analyze/Cargo.toml
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Applies to crates/biome_parser/crates/biome_*_{syntax,factory}/src/generated/** : Each new biome_<lang>_{syntax,factory} crate must have a src/generated/ directory for codegen output

Applied to files:

  • crates/biome_html_analyze/src/lint.rs
  • crates/biome_html_analyze/Cargo.toml
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Applies to crates/biome_parser/crates/**/src/lexer/mod.rs : Create a lexer module at crates/<parser_crate>/src/lexer/mod.rs

Applied to files:

  • crates/biome_html_analyze/src/lint.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Applies to crates/biome_parser/xtask/codegen/src/*_kinds_src.rs : Add src/<lang>_kinds_src.rs under xtask/codegen that returns a static KindSrc

Applied to files:

  • crates/biome_html_analyze/src/lint.rs
  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/../biome_lsp/src/server.tests.rs : Keep end-to-end LSP tests in ../biome_lsp/src/server.tests.rs

Applied to files:

  • crates/biome_html_analyze/src/lint.rs
📚 Learning: 2025-10-15T09:22:46.002Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:46.002Z
Learning: Applies to crates/biome_js_formatter/**/Cargo.toml : Declare the dependency `biome_js_formatter = { version = "0.0.1", path = "../biome_js_formatter" }` for internal installation

Applied to files:

  • crates/biome_html_analyze/Cargo.toml
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/**/Cargo.toml : Add the specified dev-dependencies under [dev-dependencies] for the test infrastructure

Applied to files:

  • crates/biome_html_analyze/Cargo.toml
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace.rs : Implement and expose the Workspace trait in src/workspace.rs

Applied to files:

  • crates/biome_html_analyze/Cargo.toml
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace/watcher.tests.rs : Place watcher tests related to workspace methods in src/workspace/watcher.tests.rs

Applied to files:

  • crates/biome_html_analyze/Cargo.toml
📚 Learning: 2025-10-15T09:23:33.055Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_type_info/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:23:33.055Z
Learning: Applies to crates/biome_js_type_info/src/type_info.rs : Add new TypeScript type support by extending the TypeData enum rather than introducing parallel structures.

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_v_bind.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Add a new LanguageKind variant (e.g., Html) in language_kind.rs and implement/cover all methods

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/lib.rs : Implement FormatLanguage for HtmlFormatLanguage with associated types: SyntaxLanguage=HtmlLanguage, Context=HtmlFormatContext, FormatRule=FormatHtmlSyntaxNode

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/cst.rs : Create FormatHtmlSyntaxNode in cst.rs implementing FormatRule<HtmlSyntaxNode> and AsFormat/IntoFormat for HtmlSyntaxNode using the provided plumbing

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
  • justfile
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Add a new language prefix (e.g., html_) to LANGUAGE_PREFIXES in language_kind.rs

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/comments.rs : Expose a public HtmlComments type alias: `pub type HtmlComments = Comments<HtmlLanguage>;`

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/tests/language.rs : Create tests/language.rs defining `HtmlTestFormatLanguage` and implement the TestFormatLanguage trait

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Run cargo codegen grammar after covering all LanguageKind variants

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Applies to crates/biome_parser/xtask/codegen/*.ungram : All node names in grammar must start with the language prefix (e.g., HtmlSimpleAttribute)

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/lib.rs : Define the HtmlFormatter type alias: `type HtmlFormatter<'buf> = Formatter<'buf, HtmlFormatContext>;`

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/comments.rs : Define HtmlCommentStyle implementing CommentStyle in comments.rs

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
⏰ 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). (1)
  • GitHub Check: Validate PR title
🔇 Additional comments (11)
.changeset/tall-jokes-send.md (1)

1-5: Changelog entry reads well

Linking the rule straight to the docs will save readers a hop; looks spot on.

crates/biome_html_analyze/Cargo.toml (1)

22-22: Dependency wiring makes sense

Pulling in biome_rule_options keeps the analyser side in step with the new options surface—no complaints here.

justfile (1)

106-109: html rule scaffolding will help contributors

Matching the other new--lintrule recipes keeps things familiar—future HTML rules just got a friendly shortcut.

xtask/codegen/src/generate_new_analyzer_rule.rs (1)

12-454: HTML generator branch slots in neatly

The new variant, template, and stubbed diagnostics mirror the existing languages, so --kind=html should now spit out compilable scaffolding without drama.

crates/biome_html_analyze/tests/specs/nursery/useVueValidVBind/invalid.vue (1)

1-29: Invalid matrix covers the troublemakers

Nice spread of missing arguments and rogue modifiers—plenty of chances for the rule to flex its error messages.

crates/biome_html_analyze/src/lint.rs (1)

1-7: LGTM! Generated code follows the expected pattern.

The nursery module is correctly added and wired into the Lint category declaration.

crates/biome_rule_options/src/use_vue_valid_v_bind.rs (1)

1-6: LGTM! Standard options boilerplate.

The empty struct is fine as a placeholder for future configuration options.

crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_bind.rs (4)

57-86: Implementation logic is sound.

The rule correctly handles both full v-bind and shorthand : forms, with appropriate checks for missing arguments and invalid modifiers.


112-112: Note: Update this message after fixing VALID_MODIFIERS.

When you remove "sync" from line 44, remember to update this diagnostic message to reflect only the valid modifiers: "prop", "camel", and "attr".


121-128: Helper function is clean and correct.

The validation logic is straightforward and handles the modifier check appropriately.


38-38: The code follows project conventions—Vue nursery rules are intentionally recommended: true.

The concern about recommended: true in a nursery rule is unfounded. Analysis of other nursery rules reveals that Vue-related rules in this codebase (no_vue_reserved_keys, no_vue_duplicate_keys, no_vue_data_object_declaration) intentionally use recommended: true, whilst most other nursery rules use false. Since useVueValidVBind is a Vue-domain rule sourced from ESLint Vue.js, it correctly follows this established pattern.

Likely an incorrect or invalid review comment.

@dyc3 dyc3 requested review from a team November 11, 2025 16:42
@dyc3 dyc3 force-pushed the dyc3/no-vue-invalid-v-bind branch from bdf59be to 0ddf5bb Compare November 11, 2025 17:44
Copy link
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

♻️ Duplicate comments (1)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_bind.rs (1)

10-14: Doc note still talks about “attribute value”.

Small tidy-up: the sentence should describe a missing value (or adjust the example), per prior feedback. It still says “The directive does not have that attribute value” while the example shows an argument-only binding. Could you rephrase it to match the actual failure case?(eslint.vuejs.org)

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bdf59be and 0ddf5bb.

⛔ Files ignored due to path filters (8)
  • Cargo.lock is excluded by !**/*.lock and included by **
  • crates/biome_configuration/src/analyzer/linter/rules.rs is excluded by !**/rules.rs and included by **
  • crates/biome_diagnostics_categories/src/categories.rs is excluded by !**/categories.rs and included by **
  • crates/biome_html_analyze/src/lint/nursery.rs is excluded by !**/nursery.rs and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVBind/invalid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVBind/valid.vue.snap is excluded by !**/*.snap and included by **
  • packages/@biomejs/backend-jsonrpc/src/workspace.ts is excluded by !**/backend-jsonrpc/src/workspace.ts and included by **
  • packages/@biomejs/biome/configuration_schema.json is excluded by !**/configuration_schema.json and included by **
📒 Files selected for processing (13)
  • .changeset/tall-jokes-send.md (1 hunks)
  • crates/biome_html_analyze/Cargo.toml (1 hunks)
  • crates/biome_html_analyze/src/lint.rs (1 hunks)
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_bind.rs (1 hunks)
  • crates/biome_html_analyze/tests/spec_tests.rs (2 hunks)
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVBind/invalid.vue (1 hunks)
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVBind/valid.vue (1 hunks)
  • crates/biome_rule_options/src/lib.rs (1 hunks)
  • crates/biome_rule_options/src/use_vue_valid_v_bind.rs (1 hunks)
  • crates/biome_ruledoc_utils/src/codeblock.rs (1 hunks)
  • justfile (1 hunks)
  • xtask/codegen/src/generate_new_analyzer_rule.rs (4 hunks)
  • xtask/rules_check/src/lib.rs (6 hunks)
✅ Files skipped from review due to trivial changes (1)
  • crates/biome_ruledoc_utils/src/codeblock.rs
🚧 Files skipped from review as they are similar to previous changes (7)
  • .changeset/tall-jokes-send.md
  • crates/biome_html_analyze/tests/spec_tests.rs
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_vue_valid_v_bind.rs
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVBind/valid.vue
  • justfile
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVBind/invalid.vue
🧰 Additional context used
🧠 Learnings (23)
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/tests/language.rs : Create tests/language.rs defining `HtmlTestFormatLanguage` and implement the TestFormatLanguage trait

Applied to files:

  • xtask/rules_check/src/lib.rs
  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/lib.rs : Implement FormatLanguage for HtmlFormatLanguage with associated types: SyntaxLanguage=HtmlLanguage, Context=HtmlFormatContext, FormatRule=FormatHtmlSyntaxNode

Applied to files:

  • xtask/rules_check/src/lib.rs
  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/tests/spec_test.rs : Implement a `run` function in tests/spec_test.rs that wires SpecSnapshot and includes!("language.rs") as shown

Applied to files:

  • xtask/rules_check/src/lib.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/cst.rs : Create FormatHtmlSyntaxNode in cst.rs implementing FormatRule<HtmlSyntaxNode> and AsFormat/IntoFormat for HtmlSyntaxNode using the provided plumbing

Applied to files:

  • xtask/rules_check/src/lib.rs
  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:22:46.002Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:46.002Z
Learning: Applies to crates/biome_js_formatter/**/Cargo.toml : Declare the dependency `biome_js_formatter = { version = "0.0.1", path = "../biome_js_formatter" }` for internal installation

Applied to files:

  • crates/biome_html_analyze/Cargo.toml
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Applies to crates/biome_parser/crates/biome_*_{syntax,factory}/** : Create per-language crates biome_<lang>_syntax and biome_<lang>_factory under crates/

Applied to files:

  • crates/biome_html_analyze/Cargo.toml
  • crates/biome_html_analyze/src/lint.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/**/Cargo.toml : Add the specified dev-dependencies under [dev-dependencies] for the test infrastructure

Applied to files:

  • crates/biome_html_analyze/Cargo.toml
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace.rs : Implement and expose the Workspace trait in src/workspace.rs

Applied to files:

  • crates/biome_html_analyze/Cargo.toml
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace/watcher.tests.rs : Place watcher tests related to workspace methods in src/workspace/watcher.tests.rs

Applied to files:

  • crates/biome_html_analyze/Cargo.toml
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/**/*.rs : After generation, remove usages of `format_verbatim_node` and implement real formatting with biome_formatter utilities

Applied to files:

  • crates/biome_html_analyze/Cargo.toml
  • crates/biome_html_analyze/src/lint.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Applies to crates/biome_parser/crates/biome_*_{syntax,factory}/src/generated/** : Each new biome_<lang>_{syntax,factory} crate must have a src/generated/ directory for codegen output

Applied to files:

  • crates/biome_html_analyze/Cargo.toml
  • crates/biome_html_analyze/src/lint.rs
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/../biome_lsp/src/server.tests.rs : Keep end-to-end LSP tests in ../biome_lsp/src/server.tests.rs

Applied to files:

  • crates/biome_html_analyze/Cargo.toml
  • crates/biome_html_analyze/src/lint.rs
📚 Learning: 2025-10-15T09:23:33.055Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_type_info/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:23:33.055Z
Learning: Applies to crates/biome_js_type_info/biome_module_graph/src/**/*.rs : Do not copy or clone data between module graph entries (including behind Arc). Each module must avoid holding duplicated data from another module to enable simple invalidation.

Applied to files:

  • crates/biome_html_analyze/Cargo.toml
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Add a new LanguageKind variant (e.g., Html) in language_kind.rs and implement/cover all methods

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Applies to crates/biome_parser/xtask/codegen/src/*_kinds_src.rs : Add src/<lang>_kinds_src.rs under xtask/codegen that returns a static KindSrc

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
  • crates/biome_html_analyze/src/lint.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Add a new language prefix (e.g., html_) to LANGUAGE_PREFIXES in language_kind.rs

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/comments.rs : Expose a public HtmlComments type alias: `pub type HtmlComments = Comments<HtmlLanguage>;`

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Run cargo codegen grammar after covering all LanguageKind variants

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Applies to crates/biome_parser/xtask/codegen/*.ungram : All node names in grammar must start with the language prefix (e.g., HtmlSimpleAttribute)

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Applies to crates/biome_parser/xtask/codegen/*.ungram : Unions of nodes must start with Any* (e.g., AnyHtmlAttribute)

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/lib.rs : Define the HtmlFormatter type alias: `type HtmlFormatter<'buf> = Formatter<'buf, HtmlFormatContext>;`

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/comments.rs : Define HtmlCommentStyle implementing CommentStyle in comments.rs

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:21:24.116Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_diagnostics/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:21:24.116Z
Learning: Applies to crates/biome_diagnostics/crates/biome_diagnostics_categories/src/categories.rs : Register any new diagnostic category in `crates/biome_diagnostics_categories/src/categories.rs`

Applied to files:

  • crates/biome_html_analyze/src/lint.rs
🧬 Code graph analysis (2)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_bind.rs (1)
crates/biome_analyze/src/rule.rs (4)
  • recommended (602-605)
  • domains (632-635)
  • sources (617-620)
  • same (246-251)
xtask/rules_check/src/lib.rs (4)
crates/biome_ruledoc_utils/src/codeblock.rs (1)
  • document_file_source (96-99)
crates/biome_js_syntax/src/file_source.rs (1)
  • try_from_extension (337-358)
crates/biome_service/src/file_handlers/mod.rs (1)
  • try_from_extension (168-204)
crates/biome_html_syntax/src/file_source.rs (2)
  • try_from_extension (112-121)
  • html (43-47)
⏰ 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). (27)
  • GitHub Check: Validate rules documentation
  • GitHub Check: autofix
  • GitHub Check: Check JS Files
  • GitHub Check: Test Node.js API
  • GitHub Check: Documentation
  • GitHub Check: End-to-end tests
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Lint project (depot-windows-2022)
  • GitHub Check: Check Dependencies
  • GitHub Check: Bench (biome_package)
  • GitHub Check: Bench (biome_graphql_parser)
  • GitHub Check: Bench (biome_json_parser)
  • GitHub Check: Bench (biome_module_graph)
  • GitHub Check: Bench (biome_js_analyze)
  • GitHub Check: Bench (biome_js_parser)
  • GitHub Check: Bench (biome_tailwind_parser)
  • GitHub Check: Bench (biome_js_formatter)
  • GitHub Check: Bench (biome_css_analyze)
  • GitHub Check: Bench (biome_configuration)
  • GitHub Check: Bench (biome_css_formatter)
  • GitHub Check: Bench (biome_css_parser)
  • GitHub Check: Bench (biome_json_analyze)
  • GitHub Check: Bench (biome_graphql_formatter)
  • GitHub Check: Bench (biome_json_formatter)
  • GitHub Check: Parser conformance
🔇 Additional comments (1)
xtask/rules_check/src/lib.rs (1)

285-293: Nice call forcing HTML parsing here.

This sidesteps the JS embedding route for .vue snippets, so the HTML analyser actually runs over the template content—exactly what this new rule needs.

Comment on lines 44 to 137
const VALID_MODIFIERS: &[&str] = &["prop", "camel", "sync", "attr"];

pub enum ViolationKind {
MissingArgument,
InvalidModifier(TextRange),
}

impl Rule for UseVueValidVBind {
type Query = Ast<AnyVueDirective>;
type State = ViolationKind;
type Signals = Option<Self::State>;
type Options = UseVueValidVBindOptions;

fn run(ctx: &RuleContext<Self>) -> Option<Self::State> {
let node = ctx.query();
match node {
AnyVueDirective::VueDirective(vue_directive) => {
if vue_directive.name_token().ok()?.text_trimmed() != "v-bind" {
return None;
}

if vue_directive.arg().is_none() {
return Some(ViolationKind::MissingArgument);
}

if let Some(invalid_range) = find_invalid_modifiers(&vue_directive.modifiers()) {
return Some(ViolationKind::InvalidModifier(invalid_range));
}

None
}
AnyVueDirective::VueVBindShorthandDirective(dir) => {
// missing argument would be caught by the parser

if let Some(invalid_range) = find_invalid_modifiers(&dir.modifiers()) {
return Some(ViolationKind::InvalidModifier(invalid_range));
}

None
}
_ => None,
}
}

fn diagnostic(ctx: &RuleContext<Self>, state: &Self::State) -> Option<RuleDiagnostic> {
Some(
match state {
ViolationKind::MissingArgument => RuleDiagnostic::new(
rule_category!(),
ctx.query().range(),
markup! {
"The v-bind directive is missing an argument."
},
)
.note(markup! {
"v-bind directives require an argument to specify which attribute to bind to."
}).note(markup! {
"For example, use " <Emphasis>"v-bind:foo"</Emphasis> " to bind to the " <Emphasis>"foo"</Emphasis> " attribute."
}),
ViolationKind::InvalidModifier(invalid_range) =>
RuleDiagnostic::new(
rule_category!(),
invalid_range,
markup! {
"This v-bind directive has an invalid modifier."
},
)
.note(markup! {
"Only the following modifiers are allowed on v-bind directives: "<Emphasis>"prop"</Emphasis>", "<Emphasis>"camel"</Emphasis>", "<Emphasis>"sync"</Emphasis>", and "<Emphasis>"attr"</Emphasis>"."
}).note(markup! {
"Remove or correct the invalid modifier."
}),
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Drop .sync from the allowed modifier list.

Vue 3 only accepts the .camel, .prop, and .attr modifiers on v-bind. Including .sync means we silently allow a deprecated construct that the Vue team removed in favour of v-model. Please remove .sync from VALID_MODIFIERS and update the diagnostic note accordingly so we flag it as invalid.(docs.w3cub.com)

🤖 Prompt for AI Agents
In crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_bind.rs around
lines 44 to 115, the VALID_MODIFIERS array and the diagnostic note still include
".sync" which is no longer valid in Vue 3; remove ".sync" from VALID_MODIFIERS
and update the diagnostic note that lists allowed modifiers so it only mentions
"prop", "camel", and "attr" (adjust any punctuation/formatting to match
surrounding markup macros). Also ensure any wording elsewhere in this range that
references ".sync" is removed or changed to reflect it being invalid.

@dyc3 dyc3 force-pushed the dyc3/no-vue-invalid-v-bind branch from 0ddf5bb to 1ddb103 Compare November 11, 2025 17:55
@dyc3 dyc3 force-pushed the dyc3/no-vue-invalid-v-bind branch from 1ddb103 to db1b096 Compare November 11, 2025 17:58
Copy link
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: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
crates/biome_html_analyze/tests/spec_tests.rs (1)

182-183: Reuse the Vue parse options in re-validation.

When we hit a .vue test, re-parsing with HtmlParseOptions::default() drops the Vue-specific source type, so the safety check can start screaming about perfectly valid constructs. Please feed the same HtmlFileSource back into parse_html when we validate the mutation.

 fn check_code_action(
     path: &Utf8Path,
     source: &str,
-    _source_type: HtmlFileSource,
+    source_type: HtmlFileSource,
     action: &AnalyzerAction<HtmlLanguage>,
 ) {
@@
-    let re_parse = parse_html(&output, HtmlParseOptions::default());
+    let re_parse = parse_html(&output, (&source_type).into());
♻️ Duplicate comments (2)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_bind.rs (2)

45-135: Drop the deprecated .sync modifier.

Vue 3 only blesses .prop, .camel, and .attr on v-bind; letting .sync slide guts the rule. Please prune it from the allow-list and from the diagnostic text.

-const VALID_MODIFIERS: &[&str] = &["prop", "camel", "sync", "attr"];
+const VALID_MODIFIERS: &[&str] = &["prop", "camel", "attr"];
@@
-                            "Only the following modifiers are allowed on v-bind directives: "<Emphasis>"prop"</Emphasis>", "<Emphasis>"camel"</Emphasis>", "<Emphasis>"sync"</Emphasis>", and "<Emphasis>"attr"</Emphasis>"."
+                            "Only the following modifiers are allowed on v-bind directives: "<Emphasis>"prop"</Emphasis>", "<Emphasis>"camel"</Emphasis>", and "<Emphasis>"attr"</Emphasis>"."

67-90: Stop flagging object-style v-bind.

At the moment any v-bind="obj" (no argument, value present) is treated as MissingArgument, even though Vue explicitly allows the object form. Grip the ESLint behaviour by only complaining about missing arguments when the value is also absent; otherwise, let it pass.

-                if vue_directive.initializer().is_none() {
-                    return Some(ViolationKind::MissingValue);
-                }
-
-                if vue_directive.arg().is_none() {
-                    return Some(ViolationKind::MissingArgument);
-                }
+                let has_argument = vue_directive.arg().is_some();
+                let has_value = vue_directive.initializer().is_some();
+
+                if !has_argument {
+                    return if has_value {
+                        None
+                    } else {
+                        Some(ViolationKind::MissingArgument)
+                    };
+                }
+
+                if !has_value {
+                    return Some(ViolationKind::MissingValue);
+                }
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0ddf5bb and db1b096.

⛔ Files ignored due to path filters (8)
  • Cargo.lock is excluded by !**/*.lock and included by **
  • crates/biome_configuration/src/analyzer/linter/rules.rs is excluded by !**/rules.rs and included by **
  • crates/biome_diagnostics_categories/src/categories.rs is excluded by !**/categories.rs and included by **
  • crates/biome_html_analyze/src/lint/nursery.rs is excluded by !**/nursery.rs and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVBind/invalid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVBind/valid.vue.snap is excluded by !**/*.snap and included by **
  • packages/@biomejs/backend-jsonrpc/src/workspace.ts is excluded by !**/backend-jsonrpc/src/workspace.ts and included by **
  • packages/@biomejs/biome/configuration_schema.json is excluded by !**/configuration_schema.json and included by **
📒 Files selected for processing (13)
  • .changeset/tall-jokes-send.md (1 hunks)
  • crates/biome_html_analyze/Cargo.toml (1 hunks)
  • crates/biome_html_analyze/src/lint.rs (1 hunks)
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_bind.rs (1 hunks)
  • crates/biome_html_analyze/tests/spec_tests.rs (2 hunks)
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVBind/invalid.vue (1 hunks)
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVBind/valid.vue (1 hunks)
  • crates/biome_rule_options/src/lib.rs (1 hunks)
  • crates/biome_rule_options/src/use_vue_valid_v_bind.rs (1 hunks)
  • crates/biome_ruledoc_utils/src/codeblock.rs (1 hunks)
  • justfile (1 hunks)
  • xtask/codegen/src/generate_new_analyzer_rule.rs (4 hunks)
  • xtask/rules_check/src/lib.rs (6 hunks)
🚧 Files skipped from review as they are similar to previous changes (8)
  • .changeset/tall-jokes-send.md
  • crates/biome_html_analyze/src/lint.rs
  • crates/biome_html_analyze/Cargo.toml
  • justfile
  • crates/biome_ruledoc_utils/src/codeblock.rs
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVBind/invalid.vue
  • crates/biome_rule_options/src/use_vue_valid_v_bind.rs
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVBind/valid.vue
🧰 Additional context used
🧠 Learnings (21)
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/tests/language.rs : Create tests/language.rs defining `HtmlTestFormatLanguage` and implement the TestFormatLanguage trait

Applied to files:

  • xtask/rules_check/src/lib.rs
  • crates/biome_html_analyze/tests/spec_tests.rs
  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/lib.rs : Implement FormatLanguage for HtmlFormatLanguage with associated types: SyntaxLanguage=HtmlLanguage, Context=HtmlFormatContext, FormatRule=FormatHtmlSyntaxNode

Applied to files:

  • xtask/rules_check/src/lib.rs
  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/tests/spec_test.rs : Implement a `run` function in tests/spec_test.rs that wires SpecSnapshot and includes!("language.rs") as shown

Applied to files:

  • xtask/rules_check/src/lib.rs
  • crates/biome_html_analyze/tests/spec_tests.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/cst.rs : Create FormatHtmlSyntaxNode in cst.rs implementing FormatRule<HtmlSyntaxNode> and AsFormat/IntoFormat for HtmlSyntaxNode using the provided plumbing

Applied to files:

  • xtask/rules_check/src/lib.rs
  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/tests/spec_tests.rs : In tests/spec_tests.rs, generate tests with `tests_macros::gen_tests! {"tests/specs/html/**/*.html", crate::spec_test::run, ""}`

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/tests/specs/html/**/*.html : Place HTML test cases under tests/specs/html as .html files discovered by the test macro

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/../biome_lsp/src/server.tests.rs : Keep end-to-end LSP tests in ../biome_lsp/src/server.tests.rs

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/tests/** : Create a tests directory containing a specs subfolder and the files spec_test.rs, spec_tests.rs, and language.rs

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace/watcher.tests.rs : Place watcher tests related to workspace methods in src/workspace/watcher.tests.rs

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
📚 Learning: 2025-10-15T09:23:33.055Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_type_info/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:23:33.055Z
Learning: Applies to crates/biome_js_type_info/src/type_info.rs : Add new TypeScript type support by extending the TypeData enum rather than introducing parallel structures.

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
📚 Learning: 2025-10-15T09:23:33.055Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_type_info/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:23:33.055Z
Learning: Applies to crates/biome_js_type_info/src/{type_info,local_inference,resolver,flattening}.rs : Avoid recursive type structures and cross-module Arcs; represent links between types using TypeReference and TypeData::Reference.

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/**/*.rs : After generation, remove usages of `format_verbatim_node` and implement real formatting with biome_formatter utilities

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
📚 Learning: 2025-10-15T09:22:46.002Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:46.002Z
Learning: Applies to crates/biome_js_formatter/**/*.rs : Use `dbg_write!` to debug and inspect the emitted IR during formatting

Applied to files:

  • crates/biome_html_analyze/tests/spec_tests.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Add a new LanguageKind variant (e.g., Html) in language_kind.rs and implement/cover all methods

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Applies to crates/biome_parser/xtask/codegen/src/*_kinds_src.rs : Add src/<lang>_kinds_src.rs under xtask/codegen that returns a static KindSrc

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Add a new language prefix (e.g., html_) to LANGUAGE_PREFIXES in language_kind.rs

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/comments.rs : Expose a public HtmlComments type alias: `pub type HtmlComments = Comments<HtmlLanguage>;`

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Run cargo codegen grammar after covering all LanguageKind variants

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Applies to crates/biome_parser/xtask/codegen/*.ungram : All node names in grammar must start with the language prefix (e.g., HtmlSimpleAttribute)

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/lib.rs : Define the HtmlFormatter type alias: `type HtmlFormatter<'buf> = Formatter<'buf, HtmlFormatContext>;`

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/comments.rs : Define HtmlCommentStyle implementing CommentStyle in comments.rs

Applied to files:

  • xtask/codegen/src/generate_new_analyzer_rule.rs
🧬 Code graph analysis (3)
xtask/rules_check/src/lib.rs (2)
crates/biome_ruledoc_utils/src/codeblock.rs (1)
  • document_file_source (96-99)
crates/biome_html_syntax/src/file_source.rs (2)
  • try_from_extension (112-121)
  • html (43-47)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_bind.rs (1)
crates/biome_analyze/src/rule.rs (4)
  • recommended (602-605)
  • domains (632-635)
  • sources (617-620)
  • same (246-251)
crates/biome_html_analyze/tests/spec_tests.rs (2)
crates/tests_macros/src/lib.rs (1)
  • gen_tests (305-312)
crates/biome_html_parser/src/lib.rs (1)
  • parse_html (37-40)
⏰ 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). (14)
  • GitHub Check: Lint project (depot-windows-2022)
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: Check Dependencies
  • GitHub Check: Test Node.js API
  • GitHub Check: Bench (biome_configuration)
  • GitHub Check: Bench (biome_json_parser)
  • GitHub Check: Bench (biome_json_formatter)
  • GitHub Check: Bench (biome_css_parser)
  • GitHub Check: autofix
  • GitHub Check: Bench (biome_js_parser)
  • GitHub Check: Bench (biome_js_analyze)
  • GitHub Check: Bench (biome_css_analyze)
  • GitHub Check: Bench (biome_js_formatter)
  • GitHub Check: Bench (biome_css_formatter)
🔇 Additional comments (3)
xtask/codegen/src/generate_new_analyzer_rule.rs (2)

12-12: LGTM! Clean addition of HTML language support.

The new Html variant and its string conversions follow the established pattern perfectly.

Also applies to: 22-22, 35-35


356-380: HTML template structure looks sound—manually verify compilation.

The GraphQL template completion and HTML template additions follow the established pattern with appropriate placeholder implementations. However, the verification script couldn't execute in this environment, so please confirm the generated HTML rules compile successfully by running:

cargo run -p xtask -- codegen-new-analyzer-rule html lint test_html_rule
cargo check -p biome_html_analyze
xtask/rules_check/src/lib.rs (1)

271-271: LGTM on the parameter threading.

The rule_language parameter is correctly threaded through assert_lint, TestRunner, and all call sites. The implementation is consistent and enables language-specific handling in the test infrastructure.

Also applies to: 758-758, 840-840, 854-858, 875-875

Comment on lines +285 to +293
let document_file_source = if rule_language == "html" {
// HACK: Force HTML analysis for rules that come from the HTML analyzer
DocumentFileSource::Html(
biome_html_syntax::HtmlFileSource::try_from_extension(&test.tag)
.unwrap_or_else(|_| biome_html_syntax::HtmlFileSource::html()),
)
} else {
test.document_file_source()
};
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Consider the fallback behaviour for invalid test tags.

The HACK comment indicates this workaround is suboptimal. Specifically, if test.tag is an invalid HTML extension (e.g., "javascript" in an HTML rule's documentation), the fallback to generic HTML parsing may produce unexpected results or mask configuration errors.

Consider either:

  • Validating that test.tag is a valid HTML extension before proceeding, or
  • Logging a warning when the fallback is triggered

Additionally, using a string literal "html" for comparison is fragile. Consider defining a constant or using an enum to avoid typos.

🤖 Prompt for AI Agents
In xtask/rules_check/src/lib.rs around lines 285 to 293, the current HACK forces
HTML analysis when rule_language == "html" and silently falls back to
DocumentFileSource::Html(...) even if test.tag is an invalid HTML extension;
update this to (1) replace the fragile string literal "html" with a shared
constant or preferably an enum variant for the rule language and use that for
comparison, (2) validate test.tag before calling try_from_extension and if it is
invalid do not silently default — log a warning (including the offending tag and
rule identifier) when the fallback to biome_html_syntax::HtmlFileSource::html()
is used, and (3) consider failing fast or returning an error when an invalid tag
is detected depending on caller expectations so configuration mistakes are not
masked.

@dyc3 dyc3 merged commit ba7b076 into main Nov 11, 2025
32 checks passed
@dyc3 dyc3 deleted the dyc3/no-vue-invalid-v-bind branch November 11, 2025 18:20
@github-actions github-actions bot mentioned this pull request Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Diagnostic Area: diagnostocis A-Linter Area: linter A-Project Area: project A-Tooling Area: internal tools L-HTML Language: HTML and super languages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants