Why am I getting the following JSLint error from the code below:
JSLint : Unexpected 'this'.
var environment = {
development: "Development",
staging: "Staging",
production: "Production",
current: function () {
return process.env.ASPNET_ENV || this.development;
},
isDevelopment: function () {
return this.current() === this.development;
},
isStaging: function () {
return this.current() === this.staging;
},
isProduction: function () {
return this.current() === this.production;
}
};
I have already seen a few similar questions like this one but none deal with the code above, where 'this' is used in a different manner.