6

I'd like to disable Eclipse's Javascript validation on certain folders, namely the asset folder populated by Yii. I've tried to add validation filters to exclude the folder by doing the following in Eclipse

  1. Window > Preferences > Validation
  2. Click Settings for Client-side JavaScript Validator
  3. Add exclude group > Add Rule
  4. Check folder and file name > select the folder that I want to exclude

However, that doesn't seem to work. Eclipse still marks several jquery files in error. Any insights to this? Thanks in advance!

1 Answer 1

5

The Client-Side JavaScript Validator only validates client-side JavaScript, i.e. the stuff in web pages. What you want to do is put jQuery into a folder you designate as a Library folder rather than a Source folder (Libraries don't get validated by the JavaScript Validator builder [you'll see it on the project's Properties dialog's Builder page]). If you need to, you can exclude a subfolder of your Source folder in your project's JavaScript Include Path to carve out a spot for a Library folder.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for clearing up what client-side javascript validator validates. I noticed that excluding a folder in the javascript include path works for certain builders, namely the JavaScript Validator. However, it doesn't seems to work for jslint4java, which is a plugin that uses jsLint. It still checks js files even in the excluded folder. Do you by any chance know how to exclude that?
No, I don't know about that one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.