digitalbazaar / eslint-config-digitalbazaar

BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

vue/multi-word-component-names #70

Closed aljones15 closed 1 year ago

aljones15 commented 1 year ago

The following rule: vue/multi-word-component-names is on by default in version 9 of eslint-plugin-vue.

This causes issues with some digitalbazaar libraries.

Here is the rule text:

This rule require component names to be always multi-word, except for root App components, and built-in components provided by Vue, such as or . This prevents conflicts with existing and future HTML elements, since all HTML elements are single words.

The issue of a name collision with future HTML elements is not entirely unfounded. We currently have vue components with single names like Drawer, Login, Share, Register, & other single names. It is a possibility that future releases of HTML could contain elements with the above names. Additionally, the absence of a framework in front of our components could create confusion. Quasar uses q so you get q-input q-drawer etc.

So we could start using br for bedrock so you get br-drawer br-login or we could turn this rule off. It errors right now. There is also an ignores option which we could set too.

List of existing HTML elements here:

https://developer.mozilla.org/en-US/docs/Web/HTML/Element

Proposed elements here:

https://www.w3.org/html/wg/next/markup/

p.s. while not mentioned in the docs I think the bigger danger is that someone creates a single world vue component that uses the name of an existing HTML element.

aljones15 commented 1 year ago

not closing this issue, but it looks like we want to make the components multi word and keep this on.

aljones15 commented 1 year ago

closing as consensus is to leave this on and rename components in our libs.