Skip to content

remove-unused-identifier codefix-all fails to remove ++ #41621

Closed
@sandersn

Description

@sandersn

Code

function h() {
    let y = 1
    y++
}

Expected behavior:

function h() {
}

OR

function h() {
    let y = 1
    y++
}

Actual behavior:

function h() {
    y++
}

The first is probably preferable because codefix-all removes both lines for this similar example:

function h() {
    let y = 1
    y = 2
}

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFix AvailableA PR has been opened for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions