我正在使用下劃線庫。與jshint一起使用下劃線
我跑jshint時,得到這樣的:
[L38:C38] W117: '_' is not defined.
var approvedAndRequstedCount = _.countBy(products, function(obj) {
警告:任務 「jshint:所有」 失敗。使用--force繼續。
這是我的配置文件:
{
"node": true,
"browser": true,
"esnext": true,
"bitwise": true,
"camelcase": false,
"curly": true,
"eqeqeq": true,
"immed": true,
"indent": 2,
"latedef": true,
"newcap": true,
"noarg": true,
"quotmark": "single",
"regexp": true,
"undef": true,
"unused": true,
"strict": true,
"trailing": true,
"smarttabs": true,
"globals": {
"angular": false
}
}
我想這件事情與全局選項?我試圖添加「_」:假但沒有運氣。有任何想法嗎?
'「_」:false'適用於我(全局變量)。 –
哦!是的,我在主配置對象上也有''-W117「:true'。 –
W117:真正解決了這個問題!謝謝。如果您以簡短的解釋發佈答案,我會批准。 – Per