Skip to content

bug: Incorrect shadow part documentation generated for camelCase part names #6671

@mahmadoev

Description

@mahmadoev

Prerequisites

Stencil Version

4.x (observed in latest version)

Current Behavior

When using a camelCase name for a shadow part (e.g. part="clickTarget"), the generated documentation (readme.md) contains incorrect and inconsistent entries.

In the "Shadow Parts" section, multiple variants of the same part name are generated:

"clickTarget" (as defined)
"clicktarget" (flattened/lowercase, incorrect)

Image

Expected Behavior

  • The documentation should only include the explicitly defined part name.
  • No additional or transformed variants (e.g. clicktarget) should be generated.
  • The output should be consistent and accurately reflect the public API.

System Info

Steps to Reproduce

  1. Create a Stencil component with a shadow part using camelCase:

<a part="clickTarget"></a>

  1. Add JSDoc:
/**
 * @part clickTarget - description
 */
  1. Build the project and generate docs (readme.md)

  2. Inspect the "Shadow Parts" section in readme.md

Code Reproduction URL

https://codesandbox.io/p/github/johnjenkins/stencil-starter/master

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug: ValidatedThis PR or Issue is verified to be a bug within Stencil

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions