When creating an object using the constructor X, I later add multiple methods in the file using
X.prototype.method = function () {...}
. Although technically an assignment statement, it behaves like a function declaration, which typically doesn't require a semicolon.
However, gulp jshint reports that the missing semicolon is an error and suggests writing it as
X.prototype.method = function () {...};
. Unfortunately, this generates an error rather than a warning that could be suppressed using a -W### directive.
Is there a way to suppress this specific error? While this may seem insignificant, I prefer maintaining cleaner code style over unnecessary adjustments.