Skip to content

consistent-selector-style: False positives with dynamic names in each blocks #1229

Closed
@marekdedic

Description

@marekdedic

Before You File a Bug Report Please Confirm You Have Done The Following...

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.

What version of ESLint are you using?

9.26.0

What version of eslint-plugin-svelte are you using?

04ca0d1

What did you do?

{#each ["one", "two"] as count}
  <b class={"bold-" + count}>Bold in each</b>
{/each}

<style>
  .bold-one {
    color: red;
  }

  .bold-two {
    color: blue;
  }
</style>

What did you expect to happen?

No error or suggesting to use ID

What actually happened?

Sufggesting using element type

Link to GitHub Repo with Minimal Reproducible Example

N/A

Additional comments

Will make a PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions