如何从我的 eclipse 项目中删除 javascript 验证? [英] How do I remove javascript validation from my eclipse project?

查看:23
本文介绍了如何从我的 eclipse 项目中删除 javascript 验证?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的项目中使用了 eclipse 并且在处理我的 eclipse 设置时,我打开了 Javascript 支持.现在 eclipse 抱怨 JQuery 库中有错误并且不让我编译项目.有谁知道如何关闭javascript验证?

I am using eclipse on my project and while messing around with my eclipse settings, I turned on Javascript support. Now eclipse complains that JQuery library has errors in it and is not letting me compile the project. Does anyone know how to turn javascript validation off?

推荐答案

我实际上喜欢验证我的 JavaScript 文件,但我绝对不想验证和处理第三方库的琐碎警告.

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.

这就是为什么我认为一起关闭验证太激烈了.幸运的是,使用 Eclipse,您可以有选择地从验证中删除一些 JavaScript 源.

That's why I think that turning off validation all together is too drastic. Fortunately with Eclipse, you can selectively remove some JavaScript sources from validation.

  1. 右键单击您的项目.
  2. 导航到:属性 → JavaScript → 包含路径
  3. 选择标签.(它看起来与 Java Build Path Source 选项卡相同.)
  4. 展开 JavaScript 源文件夹.
  5. 突出显示排除模式.
  6. 按下编辑按钮.
  7. 排除模式框旁边的添加按钮.
  8. 您可以输入 Ant 风格的通配符模式,也可以单击 Browse 按钮按名称提及 JavaScript 源.
  1. Right-click your project.
  2. Navigate to: 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. Press the Edit button.
  7. Press the 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.

JavaScript 源代码包含/排除信息保存在.settings/.jsdtscope 文件中.不要忘记将其添加到您的 SCM.

The information about JavaScript source inclusion/exclusion is saved into .settings/.jsdtscope file. Do not forget to add it to your SCM.

以下是从验证中删除 jQuery 文件后的配置:

Here is how configuration looks with jQuery files removed from validation:

这篇关于如何从我的 eclipse 项目中删除 javascript 验证?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆