Last Updated: February 25, 2016
·
3.026K
· jfromaniello

Detect unused variables with JsHint

JsHint (and so does JSLint) has an option called unused to detect unused variables and parameters.

For instance if you have the SublimeLInter package installed, you will see a message like this:

Picture

It also helps me a lot to detected unused parameters, an example of this is when I write asynchronous unit tests:

Picture

sometimes I just forget calling the done() but the linter gives me this quick feedback.

1 Response
Add your response

One of the most useful flags I enabled.

over 1 year ago ·