yeonjuan / html-eslint

ESLint plugin for linting HTML
https://html-eslint.org
MIT License
161 stars 28 forks source link

[Feature request] Enforce custom self closing tags #183

Open jcurbanog opened 7 months ago

jcurbanog commented 7 months ago

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?

yeonjuan commented 7 months ago

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