Change Eclipse settings to ignore errors on a specific file

JqueryEclipseIde

Jquery Problem Overview


In my dynamic web project in eclipse, I have jQuery in my js source folder. For some reason, Eclipse is not handling it correctly and interpreting many lines as errors in the standard jQuery file (even though I have the javascript development tools installed).

Can I turn off the error checking on the jQuery file (and that file only)? I still want it to detect errors as usual, but ignore anything in jQuery.js.

Jquery Solutions


Solution 1 - Jquery

It looks like eclipse has changed a bit,
but the following method which worked for me seems very close to the old one.

The solution consists of 2 steps:

  1. First you have to update Eclipse's preferences (Window > Preferences):

Update eclipse's preferences

Make sure that you check both Manual & Build next to the Validator you need
(in my case - a javascript one).

  1. Last you should change your project's Validators:

Update project's validators

Click on Client-side JavaScript Settings (or any other validator you need):

Validator settings

The explanation is clear but basically what you should do is as follows:

Click on Add Exclude Group..., select it and then click on Add rule....
Then pick Folder or file name (note that there are other options), and specify your file/folder.

You should be able to verify that its working by deleting the existing errors/warnings,
and then left-click your project and select the Validate option.

This setting can be committed into source control as well.

Solution 2 - Jquery

Perform these steps to solve this(This will disable eclipse validation for Javascript):

  1. Go to Eclipse > preference > Javascript> validators > Errors/Warnings
  2. Uncheck "Enable JavaScript semantic validation".

If you have messed around with the javascript settings in your projects, then restore everything to default first for all the projects that u have changed. After that, follow the steps.

Solution 3 - Jquery

I had javascript errors seen on jquery mobile file on an Android Phonegap project. I simply removed the file from the project and add it afterwards. It works now.

Solution 4 - Jquery

One way is that : 1.remove javascript -> validator -> errors/warning. 2.remove project -> .project file -> javascript command 3.It is important,too! delete js file and import again.

Solution 5 - Jquery

With eclipse Luna I was getting this as well. I did a right click on jquery.jqGrid.min.js and selected 'Validate'. It then validated fine and the errors went away.

Solution 6 - Jquery

Not sure if it'll work for all. But what i did was select the unnecessary errors in 'problems' tab of eclipse, Rclick and Delete. Eclipse stopped showing the error..

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionoymView Question on Stackoverflow
Solution 1 - JqueryGábor LiptákView Answer on Stackoverflow
Solution 2 - JqueryMandarkView Answer on Stackoverflow
Solution 3 - JquerydanpopView Answer on Stackoverflow
Solution 4 - Jqueryuser2047883View Answer on Stackoverflow
Solution 5 - JqueryAdamView Answer on Stackoverflow
Solution 6 - JqueryVishnu DahatondeView Answer on Stackoverflow