0
// jshint unused:strict

var myFunc = function(a, b, c)
{
    return b+c; // a not used => JSHint warning: 'a' is defined but never used.
};

Is there a way to disable or circumvent the warning for parameters having following parameters (in the sample above for a and b)?

For unused last parameters I always comment the parameters out (or remove them).

This isn't possible for unused first parameters in JavaScript without using arguments, or is it in some kind of way?

I guess the only option that makes sense is to disable the warning for all function parameters by changing unused:strict to unused:vars (global or locally around the function)?

RhinoDevel
  • 712
  • 1
  • 12
  • 25

1 Answers1

0

As @GOTO0 already commented, you can use

unused:true

to get exactly the wanted behavior.

Source: JSHint Options Reference

Goozak
  • 508
  • 1
  • 5
  • 21
RhinoDevel
  • 712
  • 1
  • 12
  • 25