You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JSHint reports certain syntax errors with generic messages for the following conditions:
Constructors cannot be static methods
Constructors cannot be generator methods
Accessors cannot be generator methods
Duplicate constructor definition
super used outside of class literal
super used outside of object literal
Unlike the majority of invalid syntax, these cases can be described concisely in plain English. Doing so may help users more quickly identify and correct their mistake.
To limit the profusion of error codes, consider which of these distinctions can be expressed through error message parameterization.
Edit: Some of those conditions do not need new messages. There is no restriction on static methods named "constructor", and we've recently fixed the way super is handled, including better messages.
The text was updated successfully, but these errors were encountered:
JSHint reports certain syntax errors with generic messages for the following conditions:
Constructors cannot be static methodssuper
used outside of class literalsuper
used outside of object literalUnlike the majority of invalid syntax, these cases can be described concisely in plain English. Doing so may help users more quickly identify and correct their mistake.
To limit the profusion of error codes, consider which of these distinctions can be expressed through error message parameterization.
Edit: Some of those conditions do not need new messages. There is no restriction on static methods named "constructor", and we've recently fixed the way
super
is handled, including better messages.The text was updated successfully, but these errors were encountered: