Skip to content

Linter: Diagnostic issue: html-no-duplicate-ids #388

@mguidetti

Description

@mguidetti

Line: 33
Diagnostic: Duplicate ID option--<%= opt[:id] %> 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:

<% grouped_options.second.each do |opt| %>
  <div id="option--<%= opt[:id] %>">
    ...
  </div>
<% end %>

Problematic Line:

id="option--<%= opt[:id] %>"

Environment:

  • VS Code Extension Version: 0.5.0

  • VS Code Version: 1.103.1

  • Platform: linux

  • Node Version: v22.17.0

    Herb Settings:

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

Additional Context:

This may be a duplicate #273, but want to point out the differences using a dynamically generated id and within an iterator

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