Skip to content

ts/descriptionToComment transformer clones entire token into attributes prop #374

Description

@BJJLangedijk

I ran into a small issue that had quite some impact on our application. To give some context, we use the attributes to name our tokens instead of the token path.

transform: token => mapDescriptionToComment(token),

In the above link, the ts/descriptionToComment is shown and that transformer has a type attribute. However, the transformer itself returns the entire token object instead of only the attributes. This causes the token.attributes to now be the entire token object.

I have done a quick fix on my side by using the name type which is not ideal either but it at least cleans up the attributes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions