Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better report location for html-self-closing #2723

Closed
meowtec opened this issue Mar 26, 2025 · 0 comments · Fixed by #2724
Closed

Better report location for html-self-closing #2723

meowtec opened this issue Mar 26, 2025 · 0 comments · Fixed by #2724

Comments

@meowtec
Copy link
Contributor

meowtec commented Mar 26, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant