html-eslint icon indicating copy to clipboard operation
html-eslint copied to clipboard

[Feature request] Enforce custom self closing tags

Open jcurbanog opened this issue 1 year ago • 1 comments

The current implementation of require-closing-tags includes the option allowSelfClosingCustom. When set to false, self-closing tags for custom elements are not permitted. However, when set to true, it only ignores custom tags, regardless of whether they are self-closed or not. This behavior differs from selfClosing, which enforces the use of self-closing tags of Void Elements when is set to true.

Would it be possible to include an option (or modify the existing one) that would enforce the use of self-closing tags for void custom tags?

jcurbanog avatar Mar 28 '24 02:03 jcurbanog

Hi @jcurbanog Thanks for the suggestions. I think we could support this by allowing an array of element names or regex as an option.

yeonjuan avatar Mar 31 '24 11:03 yeonjuan