Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

no-unused-variable: Not detecting unused in object deconstruction #1606

Closed
OliverJAsh opened this issue Oct 6, 2016 · 3 comments
Closed

Comments

@OliverJAsh
Copy link
Contributor

Bug Report

  • TSLint version: 3.15.1
  • TypeScript version: 2.0.2
  • Running TSLint via: Visual Studio Code

TypeScript code being linted

const foo = () => ({ y: 1 });

(() => {
    const { y } = foo();
})()

(() => {
    const { y } = foo();
})()

with tslint.json configuration:

{
    "rules": {
        "no-unused-variable": true
    }
}

Actual behavior

No error

Expected behavior

y is unused in both IIFEs.

@adidahiya
Copy link
Contributor

we're deprecating this rule in v4.0, so I'm marking this as "won't fix". check out #1481 for reasoning & alternatives.

@ghost
Copy link

ghost commented Mar 17, 2017

Should be fixed by #2235.

@ajafff
Copy link
Contributor

ajafff commented Sep 2, 2017

This was fixed in the v5.0.0 release

@ajafff ajafff closed this as completed Sep 2, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants