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.
(我实际上喜欢验证我的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.(幸运的是,使用Eclipse,您可以有选择地从验证中删除一些JavaScript源代码。)
- Right-click your project.
(右键单击您的项目。)
- Navigate to: Properties → JavaScript → Include Path
(导航至:属性→JavaScript→包含路径)
- Select Source tab.
(选择Source选项卡。)
(It looks identical to Java Build Path Source tab.)((它看起来与Java Build Path Source选项卡相同。))
- Expand JavaScript source folder.
(展开JavaScript源文件夹。)
- Highlight
Excluded
pattern.(突出显示Excluded
模式。)
- Press the Edit button.
(按“ 编辑”按钮。)
- Press the Add button next to
Exclusion patterns
box.(按“ Exclusion patterns
框旁边的“ 添加”按钮。)
- You may either type Ant-style wildcard pattern, or click
Browse
button to mention the JavaScript source by name.(您可以键入Ant样式的通配符模式,也可以单击“ Browse
按钮以按名称提及JavaScript源。)
The information about JavaScript source inclusion/exclusion is saved into .settings/.jsdtscope
file.
(有关JavaScript源包含/排除的信息将保存到.settings/.jsdtscope
文件中。)
Do not forget to add it to your SCM.(不要忘记将其添加到您的SCM。)
Here is how configuration looks with jQuery files removed from validation:
(以下是配置从验证中删除的jQuery文件的外观:)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…