I use jshint
to validate my javascript files.
On the server side, I use node.js with Mongoose. In Mongoose, I am advised to write schemas like this:
var UserSchema = new mongoose.Schema({ firstname : { type: String, default: '' } });
When starting linting, I get an error message:
Expected an identifier and instead saw 'default' (a reserved word).
Is there any way to suppress this error? I would prefer this behavior instead of writing:
var UserSchema = new mongoose.Schema({ firstname : { type: String, "default": '' } });
source share