JQuery Validation Error in Eclipse

I actually like MY JavaScript files to be validated, but I definitely don't want to validate and deal with trivial warnings with third party libraries.
That's why I think that turning off validation all together is too drastic. Fortunately with Eclipse Indigo ( 3.7 ) you can selectively remove some JavaScript sources from validation.
1. Right click your project
2. Select Properties -> JavaScript -> Include Path
3. Select Source tab. ( It looks identical to Java Build Path Source tab )
4. Expand JavaScript source folder
5. Highlight Excluded pattern
6. Click Edit button
7. Click Add button next to Exclusion patterns box.
8. You may either type Ant-style wildcard pattern, or click Browse button to mention the JavaScript source by name.


[img]http://dl.iteye.com/upload/attachment/0082/2194/bb72517a-9293-38e8-8802-1b799b61f383.png[/img]

The information about JavaScript source inclusion/exclusion is saved into .settings/.jsdtscope file. Do not forget to add it to your SCM.
Here is how configuration looks with jquery files removed from validation


You can define project specific settings for validation. See pictures below:

Click on client side Javascript alt text

[img]http://dl.iteye.com/upload/attachment/0082/2200/b100b014-59b6-3313-80cb-403a5dfead3a.png[/img]

Click on "add exclude group" and then "add rule" in exclude group. Then pick "Folder or file name", and specify "jquery.js". This should work.

[img]http://dl.iteye.com/upload/attachment/0082/2202/b17111f5-e3df-30eb-8914-b4e078f2d164.png[/img]

This setting can be committed into source control as well.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值