Skip to content

πŸ’… lint/correctness/noUndeclaredVariables: false positive on destructured slot props in Vue SFC templatesΒ #11867

Description

@hahavenn

Environment information

Version - 2.5.14

Rule name

lint/correctness/noUndeclaredVariables

Playground link

https://biomejs.dev/playground/?lintRules=noUndeclaredVariables&language=vue#code=PAB0AGUAbQBwAGwAYQB0AGUAPgAKACAAIAA8AGQAaQB2AD4ACgAgACAAIAAgADwAdABlAG0AcABsAGEAdABlACAAIwBkAGUAZgBhAHUAbAB0AD0AIgB7ACAAdgBhAGwAdQBlACAAfQAiAD4ACgAgACAAIAAgACAAIAB7AHsAIAB2AGEAbAB1AGUAIAB9AH0ACgAgACAAIAAgADwALwB0AGUAbQBwAGwAYQB0AGUAPgAKAAoAIAAgACAAIAA8AHQAZQBtAHAAbABhAHQAZQAgACMAdAByAGkAZwBnAGUAcgA9ACIAewAgAG8AcABlAG4ALAAgAHQAbwBnAGcAbABlACAAfQAiAD4ACgAgACAAIAAgACAAIAA8AGIAdQB0AHQAbwBuAAoAIAAgACAAIAAgACAAIAAgADoAYQByAGkAYQAtAGUAeABwAGEAbgBkAGUAZAA9ACIAbwBwAGUAbgAiAAoAIAAgACAAIAAgACAAIAAgAHQAeQBwAGUAPQAiAGIAdQB0AHQAbwBuACIACgAgACAAIAAgACAAIAAgACAAQABjAGwAaQBjAGsAPQAiAHQAbwBnAGcAbABlACIACgAgACAAIAAgACAAIAA%2BAAoAIAAgACAAIAAgACAAIAAgAFQAbwBnAGcAbABlAAoAIAAgACAAIAAgACAAPAAvAGIAdQB0AHQAbwBuAD4ACgAgACAAIAAgADwALwB0AGUAbQBwAGwAYQB0AGUAPgAKAAoAIAAgACAAIAA8ACEALQAtACAAYgBpAG8AbQBlAC0AaQBnAG4AbwByAGUAIABsAGkAbgB0AC8AYwBvAHIAcgBlAGMAdABuAGUAcwBzAC8AbgBvAFUAbgBkAGUAYwBsAGEAcgBlAGQAVgBhAHIAaQBhAGIAbABlAHMAOgAgAFYAdQBlACAAcwBsAG8AdAAgAHAAcgBvAHAAcwAgAGQAZQBzAHQAcgB1AGMAdAB1AHIAaQBuAGcAIAAtAC0APgAKACAAIAAgACAAPAB0AGUAbQBwAGwAYQB0AGUAIAAjAGQAZQBmAGEAdQBsAHQAPQAiAHsAIAB2AGEAbAB1AGUAIAB9ACIAPgAKACAAIAAgACAAIAAgAHsAewAgAHYAYQBsAHUAZQAgAH0AfQAKACAAIAAgACAAPAAvAHQAZQBtAHAAbABhAHQAZQA%2BAAoAIAAgADwALwBkAGkAdgA%2BAAoAPAAvAHQAZQBtAHAAbABhAHQAZQA%2BAAoACgA8AHMAYwByAGkAcAB0ACAAbABhAG4AZwA9ACIAdABzACIAIABzAGUAdAB1AHAAPgA8AC8AcwBjAHIAaQBwAHQAPgA%3D

Expected result

No noUndeclaredVariables errors: destructured slot props (<template #trigger="{ open, toggle }">) are declared in the template scope by the Vue compiler (slot props are documented at https://vuejs.org/guide/components/slots.html#scoped-slots) and must not be reported as undeclared variables.

update: Suppressing the reported diagnostics with biome-ignore is not possible β€” the suppression comment itself is flagged as suppressions/unknownRule, and the original noUndeclaredVariables errors remain.

Code of Conduct

  • I agree to follow Biome's Code of Conduct

Activity

  1. added
    S-Needs triage
    on Sep 21, 2026
  2. added theissue type on Sep 21, 2026
  3. added
    A-Linter
    S-Bug-confirmed
    L-HTML
    D-Vue
    and removed
    S-Needs triage
    on Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LinterD-VueL-HTMLS-Bug-confirmed

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions