Skip to content

Typescript indent failing for multiline properties #141

@z0rzi

Description

@z0rzi

Hi there!

Here's an example of a template where the problem occurs:

        <div className={`
            bg-white
            min-h-full
            font-sans
            text-black
            py-16 lg:py-40
            p-8 md:p-12 lg:p-0
            lg:pl-24
        `}>
            <Intro />
            <div className={`
                container
                mx-auto
            `}>
                <Education />
            </div>
        </div>

When I try indenting in Typescript, all the properties in the back tick fall to column 0. The same thing happens with the following:

        <div className={
            "bg-white "+
            "min-h-full "+
            "font-sans "+
            "text-black "+
            "py-16 lg:py-40 "+
            "p-8 md:p-12 lg:p-0 "+
            "lg:pl-24 "
        }>
            <Intro />
            <div className={
                "container "+
                "mx-auto "
            }>
                <Education />
            </div>
        </div>

Note that this problem doesn't occur in javascript. So to solve it, I just need to run set ft=javascriptreact, but then I don't have the typescript syntax.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions