Skip to content

formatting errors for generics when lang-tsx is selected  #426

@tefkah

Description

@tefkah

When trying to answer this question, I noticed that prettier does not seem to work well when the language lang-tsx is set on Stackoverflow.

It keeps turning

 const ref = useRef<SVGPathElement>(null)

into

const ref = useRef < SVGPathElement > null

When setting the language to either lang-typescript or lang-ts, it formats it correctly.
lang-tsx seems to be a valid specifier according to the guide, and does highlight the syntax correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions