noVueVOnNumberValues
Summary
Section titled “Summary”- Rule available since:
v2.4.15 - Diagnostic Category:
lint/nursery/noVueVOnNumberValues - This rule doesn’t have a fix.
- The default severity of this rule is information.
- This rule belongs to the following domains:
- Sources:
How to configure
Section titled “How to configure”{ "linter": { "rules": { "nursery": { "noVueVOnNumberValues": "error" } } }}Description
Section titled “Description”Disallow deprecated number modifiers on Vue v-on directives.
Vue 3 no longer supports using key code numbers as event modifiers.
Examples
Section titled “Examples”Invalid
Section titled “Invalid”<input v-on:keyup.13="submit" />code-block.vue:1:19 lint/nursery/noVueVOnNumberValues ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ℹ Number modifiers are deprecated on Vue v-on directives.
> 1 │ <input v-on:keyup.13=“submit” />
│ ^^
2 │
ℹ Vue 3 no longer supports key code modifiers, so this event modifier has no effect.
ℹ Use a named key modifier, such as enter, or handle the key code inside the event handler.
ℹ This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.
<input @keyup.13="submit" />code-block.vue:1:15 lint/nursery/noVueVOnNumberValues ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ℹ Number modifiers are deprecated on Vue v-on directives.
> 1 │ <input @keyup.13=“submit” />
│ ^^
2 │
ℹ Vue 3 no longer supports key code modifiers, so this event modifier has no effect.
ℹ Use a named key modifier, such as enter, or handle the key code inside the event handler.
ℹ This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.
<input v-on:keyup.enter="submit" /><input @keyup.enter="submit" />Related links
Section titled “Related links”Copyright (c) 2023-present Biome Developers and Contributors.