【发布时间】:2017-06-19 03:49:16
【问题描述】:
我正在使用 SAP eslint 配置并拥有所有配置文件,但我仍然收到此错误:
有什么建议吗?
PS:我正在使用 WebStorm
配置:
{
"env": {
"browser": true
},
"globals": {
"sap": true,
"jQuery": true
},
"rules": {
"sap-no-localhost": 2,
"sap-no-ui5base-prop": 2,
"sap-usage-basemastercontroller": 2,
"sap-no-dom-access": 2,
"sap-no-global-selection": 2,
"sap-timeout-usage": 2,
"sap-no-history-manipulation": 2,
"sap-no-ui5-prop-warning": 2,
"sap-no-proprietary-browser-api": 2,
"no-use-before-define": 2,
"no-redeclare": 2,
"no-extra-boolean-cast": 2,
"no-shadow": 2,
"no-reserved-keys": 2,
"no-unused-vars": [2, {"vars": "all", "args": "none"}],
"no-extend-native": 2,
"no-eq-null": 2,
"eqeqeq": 2,
"no-underscore-dangle": 0,
"new-cap": 0,
"quotes": 0,
"camelcase": 0,
"eol-last": 0
}
}
【问题讨论】:
-
ESLint 没有内置此规则 (eslint.org/docs/rules),这就是它找不到它们的原因。如果可用,您可能应该安装一些额外的 ESLint 插件来添加这些规则。