Skip to content

Bad indentation for // ts-ignore comments #24113

@DanielRosenwasser

Description

@DanielRosenwasser

Take this JavaScript code

// @ts-check

function stuff() {
    return alert(1 * "1");
}

Apply the ignore quick fix on "1".

Get sad:

// @ts-check

function stuff() {
        // @ts-ignore
return alert(1 * "1");
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: FormatterThe issue relates to the built-in formatterDomain: Quick FixesEditor-provided fixes, often called code actions.FixedA PR has been merged for this issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions