Skip to content

Instantly share code, notes, and snippets.

@nicknisi
Created April 15, 2013 15:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicknisi/5388996 to your computer and use it in GitHub Desktop.
Save nicknisi/5388996 to your computer and use it in GitHub Desktop.
I believe JSHint shouldn't throw an error on this when the unused variable is a paramater in the function, as having it defined can help define the function, even if it isn't necessarily used.
/*jshint strict:false,unused:true*/
function foo (bar) {
console.log('hello, world!');
}
foo();
// var.js: line 3, col 18, 'bar' is defined but never used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment