Skip to content

Commit f924f23

Browse files
authored
fix(useVueValidVOn): align more with source rule, also use phf hash sets for perf (#8815)
1 parent 6f56b6e commit f924f23

8 files changed

Lines changed: 442 additions & 117 deletions

File tree

.changeset/evil-walls-talk.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
"@biomejs/biome": patch
3+
---
4+
5+
Improved [`useVueValidVOn`](https://biomejs.dev/linter/rules/use-vue-valid-v-on/) to be more closely aligned with the source rule. It will now properly allow modifiers for all possible keyboard events. It should have better performance when there are no violations of the rule as well.
6+
7+
Now treated valid:
8+
```vue
9+
<div @keydown.arrow-down="handler"></div>
10+
<div @keydown.a="handler"></div>
11+
<div @keydown.b="handler"></div>
12+
<div @keydown.27="foo"></div>
13+
```

Cargo.lock

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ libc = "0.2.180"
129129
mimalloc = "0.1.48"
130130
papaya = "0.2.3"
131131
path-absolutize = { version = "3.1.1", features = ["use_unix_paths_on_wasm"], optional = false }
132+
phf = { version = "0.13.1", features = ["macros"] }
132133
proc-macro-error2 = { version = "2.0.1", default-features = false }
133134
proc-macro2 = "1.0.105"
134135
quickcheck = "1.0.3"

crates/biome_html_analyze/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ biome_rowan = { workspace = true }
2222
biome_rule_options = { workspace = true }
2323
biome_string_case = { workspace = true }
2424
biome_suppression = { workspace = true }
25+
phf = { workspace = true }
2526
schemars = { workspace = true, optional = true }
2627
serde = { workspace = true, features = ["derive"] }
2728

0 commit comments

Comments
 (0)