Autocomplete for LWC markup name (kebab-case) is incorrect for sequential capital letters

Issue #1863 resolved
Chuck Liddell created an issue

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)

  1. Scott Wells repo owner

    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.

  2. Scott Wells 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>
    
  3. Log in to comment