Autocomplete for LWC markup name (kebab-case) is incorrect for sequential capital letters
Issue #1863
resolved
I have an LWC named “graphQLArgumentEditor”. The kebab-case equivalent for the LWC engine is “graph-q-l-argument-editor”, however Illuminated Cloud predicts “graph-ql-argument-editor” (missing a hyphen) for its auto-complete when including this component in another component’s template file, producing a compilation error if used.
Comments (3)
-
repo owner -
repo owner Fix committed for inclusion in this week's build. This all now works properly for any camel case-to-kebab case conversion (and vice-versa, of course):
<c-my-component -capitalized-property-name={CapitalizedPropertyName} standard-property-name={standardPropertyName} adjacent-c-a-p-s-property-name={adjacentCAPSPropertyName} -l-e-a-d-i-n-g-adjacent-caps-property-name={LEADINGAdjacentCapsPropertyName} > </c-my-component>
-
repo owner - changed status to resolved
Delivered in 2.1.7.2.
- Log in to comment
Yeah, this was reported by another user directly via email the other day. I'm using a plugin SDK utility function right now to split the camel-cased name into words, then lower-casing and joining back with hyphens. Evidently that utility function considers adjacent capital letters to be part of the same word, though. I probably won't have this fixed for this week's build but should for next week's at the latest.