用SAP UI5编写了一个javascript文件,有很多的errors,第一个就是:
‘sap' is not defined. (http://eslint.org/docs/rules/no-undef)
用浏览器打开http://eslint.org/docs/rules/no-undef,了解到这些错误只是Javascript验证工具ESlint验证的结果,不影响代码的运行,只是有潜在风险。
在eclipse中,ESlint的验证功能默认是打开的,只需将其关闭即可,具体步骤:
在eclipse的窗口,选 windows - perferences - Validation,取消ESlint Validator后面的勾。