Eslint-plugin-vue: html-no-self-closing shouldn't be part of the recommended config

Created on 24 Jun 2017  路  3Comments  路  Source: vuejs/eslint-plugin-vue

What did you expect to happen?

html-no-self-closing should not have been included. I don't see why it should be the default. It's a preference. People used to XHTML won't like that.

What actually happened?

html-no-self-closing was enabled when using plugin:vue/recommended.

accepted proposition

Most helpful comment

Thank you for this issue.

I agree.

That rule has been created in an invalid assumption: HTML does not support self-closing elements, so Vue.js as well. I have learned that Vue.js supports self-closing elements in #29.

Currently, I think that we should remove html-no-self-closing rule entirely then create new html-self-closing rule which people can configure always/never to use self-closing elements. Of course, plugin:vue/recommended should not include the new stylistic rule.

All 3 comments

Thank you for this issue.

I agree.

That rule has been created in an invalid assumption: HTML does not support self-closing elements, so Vue.js as well. I have learned that Vue.js supports self-closing elements in #29.

Currently, I think that we should remove html-no-self-closing rule entirely then create new html-self-closing rule which people can configure always/never to use self-closing elements. Of course, plugin:vue/recommended should not include the new stylistic rule.

I noticed this as well a couple days ago - Looking forward for this change!

ATM I'll just disable this rule in default configuration, as otherwise we'd need to update major version which is better to be ommited in this beta period. Let's come to a point where we have a stable ground, and then we can remove unnecessary rules and activate new ones in default configuration at once with official v4, that is coming our way. cc @mysticatea

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lichnow picture lichnow  路  3Comments

armano2 picture armano2  路  4Comments

filipalacerda picture filipalacerda  路  4Comments

apertureless picture apertureless  路  4Comments

maple-leaf picture maple-leaf  路  3Comments