Prop name casing setting for attribute completion
See original GitHub issueInfo
- Platform: Win 10
- Vetur version: 0.16.2
- VS Code version: 1.31.1
Problem
Vue’s styleguide for strongly recommended prop name casing establishes the following:
Prop names should always use camelCase during declaration, but kebab-case in templates and JSX.
Could there be an option to set this in settings? Just like we do for PascalCase tag casing with "vetur.completion.tagCasing": "initial"
.
Something like:
"vetur.completion.attrCasing": "kebab-case"
Reproducible Case
Set a prop
using camelCase
:
Attribute completion is in camelCase
instead of kebab-case
.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:15
- Comments:9 (3 by maintainers)
Top Results From Across the Web
vue/prop-name-casing
Rule Details #. This rule enforce proper casing of props in vue components(camelCase).
Read more >Is the default rule vue/attribute-hyphenation in conflict with vue ...
I am working on the project using eslint-plugin-vue and I have child and parent components. the child component needs to pass a value...
Read more >Attribute selectors - CSS: Cascading Style Sheets | MDN
Represents elements with an attribute name of attr whose value is a whitespace-separated list of words, one of which is exactly value.
Read more >Miscellaneous attributes interpreted by the C# compiler
Beginning in C# 9, the SkipLocalsInit attribute prevents the compiler from setting the .locals init flag when emitting to metadata. The ...
Read more >7 The global structure of an HTML document - W3C
This attribute identifies a property name. This specification does not list legal values for this attribute. content = cdata [CS]: This attribute specifies...
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
I see, thanks for the report.
"vetur.completion.tagCasing": "kebab"
will complete the<azure-map>
tag inkebab-case
, but I’m referring to the attributeexampleProp
. Could we have an option to suggestexample-prop
instead of itscamelCase
version?I’d like to use the tag completion in
PascalCase
("vetur.completion.tagCasing": "initial"
), but the attribute completion inkebab-case
.ie.
This is something that can be fixed on save with
eslint
. Maybe leaving it toeslint
is okay?