Eclipse:强制项目不显示js目录的错误

时间:2023-01-24 16:39:16

I have a web project that uses a number of 3rd party js libraries. Since they are optimized Eclipse shows that there are errors in these files. I'd like to configure eclipse to ignore certain js directories for error processing and validation.

我有一个使用许多第三方js库的Web项目。由于它们已经过优化,因此Eclipse显示这些文件存在错误。我想配置eclipse来忽略某些js目录以进行错误处理和验证。

I think I now have it configured to ignore validation via the validation settings under Project > Properties > Validation > Client Side JavaScript > Settings. I've added an exclude rule for my 3rd party lib directory. My issue is that it still shows errors under Markers > Javascript Problems.

我想我现在已将其配置为通过项目>属性>验证>客户端JavaScript>设置下的验证设置忽略验证。我为我的第三方lib目录添加了排除规则。我的问题是它仍然在Markers> Javascript Problems下显示错误。

Any help would be appreciated, thank you!

任何帮助将不胜感激,谢谢!

1 个解决方案

#1


9  

The Client-Side JavaScript validator only validates client-side JavaScript--JavaScript in web pages. You've only instructed it to ignore Javascript in web pages in those folders. What you want can be done by changing those folders from Source folders to Library folders in the JavaScript Include Path. Project > Properties > JavaScript > Include Path. Either remove them, or set an exclusion on the Source folder so that it's legal to put a Library folder under it.

客户端JavaScript验证器仅验证客户端JavaScript - 网页中的JavaScript。您只是指示它忽略这些文件夹中的网页中的Javascript。您可以通过在JavaScript包含路径中将这些文件夹从源文件夹更改为库文件夹来完成您的操作。项目>属性> JavaScript>包含路径。删除它们,或在Source文件夹上设置一个排除项,以便在其下放置一个Library文件夹是合法的。

#1


9  

The Client-Side JavaScript validator only validates client-side JavaScript--JavaScript in web pages. You've only instructed it to ignore Javascript in web pages in those folders. What you want can be done by changing those folders from Source folders to Library folders in the JavaScript Include Path. Project > Properties > JavaScript > Include Path. Either remove them, or set an exclusion on the Source folder so that it's legal to put a Library folder under it.

客户端JavaScript验证器仅验证客户端JavaScript - 网页中的JavaScript。您只是指示它忽略这些文件夹中的网页中的Javascript。您可以通过在JavaScript包含路径中将这些文件夹从源文件夹更改为库文件夹来完成您的操作。项目>属性> JavaScript>包含路径。删除它们,或在Source文件夹上设置一个排除项,以便在其下放置一个Library文件夹是合法的。