Rule proposal: `component-name-in-template-casing`
See original GitHub issueStyle guide: https://vuejs.org/v2/style-guide/#Component-name-casing-in-templates-strongly-recommended
Description:
This rule would ensure proper component names in templates. As we only check .vue
files in terms of templates we can provide both options: kebab-case
and PascalCase
Good examples:
- kebab-case
<the-component />
- PascalCase
<TheComponent />
Bad examples:
<theComponent />
<Thecomponent />
<The-component />
and obviously with kebab-case
option it would warn about PascalCase
and vice-versa.
Default option would be PascalCase
.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:6
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Proposed rule: Order Competition Rule - SEC.gov
proposed rule would prohibit a restricted competition trading center from internally executing certain orders of individual investors at a ...
Read more >Self-Regulatory Organizations: Notice of Filing and Immediate ...
A. Self-Regulatory Organization's Statement of the Purpose of, and Statutory Basis for, the Proposed Rule Change. 1. Purpose. The Exchange ...
Read more >SEC Proposes Equity Market Overhaul and Best Execution Rule
The SEC is proposing to amend Regulation NMS to (1) amend the tick sizes under Rule 612 to establish a variable minimum pricing...
Read more >SEC Proposes Amendments to the Shareholder Proposal Rules
The SEC proposed modifying certain bases for excluding shareholder proposals from company proxy statements. If adopted, these amendments are ...
Read more >SEC Proposes Amendments to Shareholder Proposal Rule
Rule 14a-8 under the Securities Exchange Act provides a means by which shareholders can submit proposals for inclusion in a company's proxy ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Mouvedia Agree with you.
PascalCase
is not the best option for everyone. But the same forkebab-case
. I don’t think this eslint plugin is able to parse DOM templates at all. Because currently it relies on*.vue
extension and// @vue/component
comment so only SFC will be checked. But DOM templates are usually hidden somewhere in the back-end templates. Correct me please, if I’m wrong here.This plugin tries to follow official Vue Style Guide so
PascalCase
should be default. But of course. there should be configuration for this rule. So you can easily configure it to usekebab-case
or both if you likeIt depends on what matters the most to you:
Both are valid options and have CONs/PROs. One reason we should go with one or the other is if a convention exists on the React side: it would be detrimental to not follow their lead.