本文翻译自:How do I remove javascript validation from my eclipse project?
I am using eclipse on my project and while messing around with my eclipse settings, I turned on Javascript support. 我在我的项目中使用eclipse,在弄乱我的eclipse设置时,我启用了Javascript支持。 Now eclipse complains that JQuery library has errors in it and is not letting me compile the project. 现在eclipse抱怨JQuery库中有错误,并且不让我编译项目。 Does anyone know how to turn javascript validation off? 有谁知道如何关闭javascript验证?
#1楼
参考:https://stackoom.com/question/D8kA/如何从我的eclipse项目中删除javascript验证
#2楼
I was able to exclude the jquery.mobile 1.1.1 in Juno by selecting Add Multiple next to the Exlusion Patterns, which brings up the tree, then drilling down to the jquery-mobile folder and selecting that. 我能够通过选择Exlusion Patterns旁边的Add Multiple来排除Juno中的jquery.mobile 1.1.1,它会打开树,然后向下钻取到jquery-mobile文件夹并选择它。
This corrected all the warnings for the library! 这纠正了图书馆的所有警告!
#3楼
Another reason could be that you acidentically added a Javascript nature to your project unintentionally (i just did this by accident) which enables javascript error checking. 另一个原因可能是您无意中为您的项目添加了Javascript性质(我只是意外地做了这个),这使得javascript错误检查成为可能。
removing this ....javascriptnature from your project fixes that. 从您的项目中删除此.... javascriptnature修复了这一点。
(this is ofcourse only if you dont want eclipse to realise you have any JS) (这只是当然,如果你不想让eclipse意识到你有任何JS)
#4楼
I removed the tag in the .project . 我删除了.project中的标记。
<buildCommand>
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
<arguments>
</arguments>
</buildCommand>
It's worked very well for me. 它对我来说非常好用。
#5楼
Window -> Preferences -> JavaScript -> Validator (also per project settings possible) 窗口 - >首选项 - > JavaScript - >验证器(也可以根据项目设置)
or 要么
Window -> Preferences -> Validation (disable validations and configure their settings) 窗口 - >首选项 - >验证(禁用验证并配置其设置)
#6楼
In addition, if you are using Tern eclipse IDE or IBM Node.js Tools for Eclipse, you may need to disable JSHint and other libraries that you don't want. 此外,如果您使用的是Tern eclipse IDE或IBM Node.js Tools for Eclipse,则可能需要禁用JSHint和其他您不需要的库。
To disable this, Project Properties > Tern > Modules > JSHint or any other library that you don't want. 要禁用它,项目属性> Tern>模块> JSHint或您不想要的任何其他库。