javascriptlint icon indicating copy to clipboard operation
javascriptlint copied to clipboard

doesn't flag undeclared use of InternalError

Open davepacheco opened this issue 9 years ago • 0 comments

The version of javascriptlint in master right now treats "InternalError" as one of the built-in globals, similar to RangeError or TypeError:

https://github.com/davepacheco/javascriptlint/blob/040bf5e429969ae42d976b570fd64c9e17fab20f/javascriptlint/lint.py#L30

This appears to be a non-standard class used by Firefox:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/InternalError

It would probably be better to remove it from the list of built-in globals and have people using Firefox add it as a definition in their project-specific configuration file.

Right now, if you have (say) Node code that uses an InternalError class, javascriptlint will fail to identify cases where that name hasn't been properly declared.

davepacheco avatar Aug 04 '16 22:08 davepacheco