jshint-eclipse icon indicating copy to clipboard operation
jshint-eclipse copied to clipboard

Expected name at 1:2

Open ssaunders opened this issue 12 years ago • 7 comments

The last thing I want to do is submit an issue, and then find out it's a user error, but I spent the last couple hours searching, and cannot find any other place to get help on errors. If there is a more appropriate channel, please direct me there.

I am developing using Kepler Service Release 1 on Windows 7. I installed the JSHint plugin without any issue, restarted the program, and added *.js files to the project properties. However, nothing shows up, and I periodically get this error: Errors occurred during the build. Errors running builder 'JSHint Problem Checker' on project 'awesome'. Expected name at 1:2

Is this an error, or am I missing something? Thanks in advance.

ssaunders avatar Jan 17 '14 21:01 ssaunders

Looks like a JSON error in your JSHint configuration. Please check both the workspace preferences (Main menu > Window > Preferences > JSHint > Configuration) and your project's properties (Context menu on your project 'awesome' > Properties > JSHin > Configuration).

ralfstx avatar Jan 18 '14 10:01 ralfstx

That was it. Comments are not allowed. Thanks.

ssaunders avatar Jan 21 '14 23:01 ssaunders

Comments should be allowed. If you use the latest version (0.9.10), could you post your configuration in #76?

ralfstx avatar Jan 22 '14 09:01 ralfstx

Unfortunately, I didn't save the config, so i can't post it. However, I have gone back and added comments in and it worked just fine. It would have looked something like this:

{ /* "curly": true, "eqeqeq": true, "forin": true, "freeze": true, "immed": true, "latedef": true, "newcap":true, "noempty": true, "nonew": true, "quotmark":true, "undef": true, "unused": true, "laxbreak": true, "lastsemic": true, "smarttabs":true, "globals": { "Ext":true, "APP_NAME":true, "wt":true } */

"browser": true, "devel": true }

I think I assumed it was the comments because the error seemed to be referring to the first part of the config, and that was where the comment was.

ssaunders avatar Jan 22 '14 20:01 ssaunders

...and then I found it.


{
/*
  "curly": true,
  "eqeqeq": true,
  "immed": true,
  "freeze": true,
  "latedef": true,
  "noempty": true,
  "nonew": true,
  "undef": true,
  "unused": true,
  //ENVIRONMENT
  "globals": {
    "Ext":true
  },
*/
  "browser": true,
  "devel": true
}

ssaunders avatar Jan 22 '14 20:01 ssaunders

It turns out I'm using "JSHint Eclipse Integration 0.9.9.20131029-1050", but when I update, "No updates [are] found".

ssaunders avatar Jan 24 '14 20:01 ssaunders

Right, 0.9.9 is the latest published version. I was using a build from the latest sources.

ralfstx avatar Jan 25 '14 13:01 ralfstx