Two things I noticed about version 11 right away. The following snippet triggers several warnings in “your” jshint 2.9.5 while the “real” jshint 2.9.5 likes it just fine (esversion was set to 6 in both cases):
var Test = class {
get [ Symbol.toStringTag ] () {
return 'Test';
}
};
Pointing to a custom version of jshint - or the “real” jshint as it were - still disables syntax checking entirely.
Oh, sorry. All warnings relate to the Symbol.toStringTag getter (line 2234):
2234: Expected ‘(’ and instead saw ‘[’.
2234: Expected ‘)’ to match ‘[’ from line 2234 and instead saw ‘.’.
2234: Expected ‘}’ to match ‘{’ from line 1788 and instead saw ‘]’.
2234: Bad invocation.
2234: Missing semicolon.
Tested against jshint (not from the CLI but the online version) with nothing but “esversion: 6”
Hm. You’re right. The test code wasn’t representative of the actual code which looks more like this:
var Test = function () {};
Test.prototype = {
get [ Symbol.toStringTag ] () {
return 'Test';
}
};
And, yes, that does trigger errors in the CLI version and the online version of jshint as well. Maybe getting weird errors serves me right for assigning to the prototype… My apologies!