Skip to content

Better report location for html-self-closing #2723

Closed
@meowtec

Description

@meowtec

What rule do you want to change?
The html-self-closing rule currently highlights the entire element when there's an error. I suggest changing it to highlight only the closing part, like /> or </Element>.

Does this change cause the rule to produce more or fewer warnings?

How will the change be implemented? (New option, new default behavior, etc.)?
Adjust report({ loc })

Please provide some example code that this change will affect:

<template>
  <div>
    <div />
    <div></div>
  </div>
</template>

What does the rule currently do for this code?

截屏2025-03-26 14 13 22 截屏2025-03-26 14 13 03

What will the rule do after it's changed?

Image Image

It will be easier to focus on the specific error.

Additional context

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