Can anyone give me some pointers on fixing a warning I'm getting with JSLint.
I have the following code:
/* global window, define, module */
(function(global, factory) {
var Gauge = factory(global);
if(typeof define === "function" && define.amd) {
// AMD support
define(function() {return Gauge;});
}else if(typeof module === "object" && module.exports) {
// CommonJS support
module.exports = Gauge;
}else {
// We are probably running in the browser
global.Gauge = Gauge;
}
})(typeof window === "undefined" ? this : window, function(global, undefined) {
On the final line (typeof window === "undefined" ...
I'm getting this warning:
Line 14: Shadowing of global property 'undefined' no-shadow-restricted-names
I'd like to get rid of this warning if possible.