eslint-plugin-vue
eslint-plugin-vue copied to clipboard
Add option to separately control self-closing tag's closing-bracket newline
Please describe what the rule should do:
hope to Add particular option on the rule, vue/html-closing-bracket-newline
, to control self-closing tag's closing-bracket newline.
What category should the rule belong to?
- [x] Enforces code style
- [ ] Warns about a potential error
- [ ] Suggests an alternate way of doing something
- [ ] Other (please specify:)
Provide 2-3 code examples that this rule should warn about:
so that we can respectively control the un-self-closing tag and self-closing tag's closing-bracket style. like below
<!--
the rule may like this:
{
"vue/html-closing-bracket-newline": ["error", {
"singleline": "never",
"multiline": {
"unselfclose": "never",
"selfclose": "always"
},
}]
}
-->
<component attr1="value1" attr2="value2"></component>
<component attr1="value1" attr2="value2" />
<component
attr1="value1"
attr2="value2">
content
</component>
<component
attr1="value1"
attr2="value2"
/>
THX :)
I'm also looking for something similar 👍