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:
It also helps me a lot to detected unused parameters, an example of this is when I write asynchronous unit tests:
sometimes I just forget calling the done()
but the linter gives me this quick feedback.
Written by José F. Romaniello
Related protips
1 Response
One of the most useful flags I enabled.
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Node
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#