-
-
Notifications
You must be signed in to change notification settings - Fork 385
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
enforce no self-closing tags with tag-self-close #311
Labels
Comments
thedaviddias
added
enhancement
Functionality that enhances existing features
PR needed
triage
An HTMLHint team member will look at this issue
labels
Jan 10, 2019
linahsie
added
#status: accepted 👍
and removed
triage
An HTMLHint team member will look at this issue
labels
Feb 23, 2019
linahsie
added a commit
to linahsie/HTMLHint
that referenced
this issue
Feb 24, 2019
2 tasks
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
stale
bot
added
the
bot:stale
Issue marked as stale because there was no activity
label
May 14, 2020
zcorpan
added a commit
to bocoup/HTMLHint
that referenced
this issue
Oct 26, 2021
stale
bot
removed
the
bot:stale
Issue marked as stale because there was no activity
label
Oct 27, 2021
thedaviddias
pushed a commit
that referenced
this issue
Oct 29, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the solution you'd like
The
tag-self-close
rule, when true, requires empty tags to be self-closed. When false, this rule does not apply.I would like an option to require tags not to be self-closed.
<br/>
should always be typed as<br>
,<hr />
as<hr>
, no self-closing tags formeta
,link
, ect.With HTML5 as a standard for the last four years, and self-closing tags being optional in the spec, I feel this is practical to enforce consistent markup.
Describe alternatives you've considered
Simply using
"tag-self-close": false
does not enforce not having closing tags. I've seen numerous code samples that use a mix of self-closed and unclosed tags, which I feel to be sloppy.Additional context
HTML5 self-closing tags are optional.
If this feature request is approved, all void elements (
link
,meta
,hr
,br
, ect) should be able to have no-self-closing enforced on them.There may need to be an exception for foreign elements such as svg-related tags.
The text was updated successfully, but these errors were encountered: