Skip to content

🐛 Vue parser fails with @keydown.:.stop.prevent="..." #8765

@Blechlawine

Description

@Blechlawine

Environment information

Details
CLI:
  Version:                      2.3.11
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           linux

Environment:
  BIOME_LOG_PATH:               unset
  BIOME_LOG_PREFIX_NAME:        unset
  BIOME_CONFIG_PATH:            unset
  BIOME_THREADS:                unset
  NO_COLOR:                     unset
  TERM:                         xterm-kitty
  JS_RUNTIME_VERSION:           v24.11.0
  JS_RUNTIME_NAME:              node
  NODE_PACKAGE_MANAGER:         bun/1.3.4

Biome Configuration:
  Status:                       Loaded successfully
  Path:                         biome.json
  Formatter enabled:            true
  Linter enabled:               true
  Assist enabled:               true
  VCS enabled:                  true
  HTML full support enabled:    true

Workspace:
  Open Documents:               0

What happened?

  1. use this attribute in a vue file: @keydown.:.stop.prevent="() => {}"
  2. I think the : part is probably the problem, but this is valid vue syntax and works at runtime as expected
  3. the output i get is:
Biome encountered an unexpected error

This is a bug in Biome, not an error in your code, and we would appreciate it if you could report it to https://github.com/biomejs/biome/issues/ along with the following information to help us fixing the issue.

When opening the issue, please provide a minimal reproduction, or identify and share the file/code that triggers it. Without a way to reproduce the error, the error can't be fixed:

Source Location: /__w/biome/biome/crates/biome_parser/src/diagnostic.rs:395:14
Thread Name: biome::workspace_worker_8
Message: Expected token to be a punctuation or keyword.

admin/src/components/input/Time.vue internalError/panic  INTERNAL  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  ✖ processing panicked: Expected token to be a punctuation or keyword.

  ⚠ This diagnostic was derived from an internal Biome error. Potential bug, please report it if necessary.

In the referenced file, when i removed that attribute, biome didn't panic, but formatted everything as expected

Expected result

it should not panic

Code of Conduct

  • I agree to follow Biome's Code of Conduct

Metadata

Metadata

Assignees

Labels

A-ParserArea: parserD-VueDomains: VueL-HTMLLanguage: HTML and super languagesS-Bug-confirmedStatus: report has been confirmed as a valid bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions