blakeembrey / tslint-config-standard

A TSLint config for JavaScript Standard Style
Other
358 stars 43 forks source link

Remove no-unused-variable (deprecated in tslint) #49

Closed katanacrimson closed 6 years ago

katanacrimson commented 6 years ago

Current versions of tslint emit the following deprecation warning:

no-unused-variable is deprecated. Since TypeScript 2.9. Please use the built-in compiler checks instead.
unional commented 6 years ago

To workaround this for now, you can add the following to your tslint.json:

{
  "rules": {
    "no-unused-variable": null
  }
}
DaniGuardiola commented 6 years ago

@unional thanks!!

Edit: better use false instead of null, although it still works.

unional commented 6 years ago

Yes, you can set it to false. I set it to null in my tslint-config-unional because I don't want to dictate the value to the end consumer, although the behavior is exactly the same. 🌷

blakeembrey commented 6 years ago

Feel free to submit a PR removing this!

ghost commented 6 years ago

Is there a way to make it conditional on typescript version? or does that not matter enough?

blakeembrey commented 6 years ago

Doesn't matter enough, just go for it 😄 It's unfortunate it was deprecated at all, even though TypeScript has the functionality built-in. I wonder if it's just to remove the additional overhead of maintenance?

unional commented 6 years ago

I did that in my package

ghost commented 6 years ago

I didn't understand why, but folks were talking about how it was either difficult or impossible to implement no-unused-variable in the language service