Loading ...
Sorry, an error occurred while loading the content.

2189Re: option.unparam

Expand Messages
  • Douglas Crockford
    May 1, 2011
    • 0 Attachment
      --- In jslint_com@yahoogroups.com, "IceBox" <albertosantini@...> wrote:
      >
      >
      > --- In jslint_com@yahoogroups.com, "Douglas Crockford" <douglas@> wrote:
      > >
      > > JSLint will now report unused parameters. If you want to suppress
      > > that report, set option.unparam to true.
      > >
      >
      > For instance (letting option.unparam to the default),
      >
      > function(unusedParam, usedParam) {...
      >
      > The style adopted should be
      >
      > function() {
      > var usedParam = arguments[1];
      > ...
      >
      > Is it "correct"?

      No. That would be stupid. It is unwise to be designing functions with unused parameters. But if you do so anyway, then you should use option.unparam.
    • Show all 9 messages in this topic