Skip to content

Diagnostic issue: html-no-duplicate-ids #441

@MatheusRich

Description

@MatheusRich

Line: 4
Diagnostic: Duplicate ID id-1 found. IDs must be unique within a document.
Severity: Error

File Content:
Please paste your HTML ERB file content below to help us reproduce the issue:

<% if some_condition? %>
  <span id="id-1">content1</span>
<% else %>
  <span id="id-1">content2</span>
<% end %>

Problematic Line:

  <span id="id-1">content2</span>

Environment:

  • VS Code Extension Version: 0.6.0

  • VS Code Version: 1.104.0-insider

  • Platform: darwin

  • Node Version: v22.17.0

    Herb Settings:

{
"linter.enabled": true,
"trace.server": "verbose"
}

Additional Context:

A bit of a contrived example, but the ids aren't actually duplicate, as these are mutually exclusive.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglinter

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions