Closed RobertGary1 closed 11 years ago
This is almost certainly not related to the Eclipse plug-in. Please open an issue against jshint.
Unfortunately because it doesn't reproduce outside of Ecilpse I'm not able to report it against JSHint. We're mostly using IntelliJ and that exact line of code works correctly and its also using JSHint 2.1.2 :(
Ok, since you have reason to believe that it's not related to this version of jshint, let me check your code snippet inside and outside Eclipse.
I'm also seeing the same behavior using the latest version of the jshint-eclipse plugin. Upgraded to JSHint 2.1.7, doesn't seem to solve the issue.
Apparently, for JSHint 2.x you have to enable es3: true
: https://github.com/jshint/jshint/issues/1131
The code...
/jshint es5:true / var obj = { name: 'Anton', //THIS IS AN ERROR };
Should generate an error about a trailing comma. However, its not,
Running 0.9.7.20130526-111.
-Robert