[英]JSHint in my vim marks 'yield' as a warning.
I'm writing some mocha tests and using vim with JSHint. 我正在编写一些摩卡测试,并在JSHint中使用vim。 Unfortunately JSHints gives me A LOT of warnings due to the 'yield' keyword.
不幸的是,由于“ yield”关键字,JSHints给了我很多警告。
'yield' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
在ES6(使用“ esversion:6”)或Mozilla JS扩展(使用moz)中可以使用“ yield”。
This is warning W118 and I have tried to disable this warning in my .jshintrc file with 这是警告W118,我尝试使用以下命令在我的.jshintrc文件中禁用此警告:
{
"mocha": true,
"-W118": true
}
but so far I am unsuccesfull in hiding this warning. 但是到目前为止,我仍无法成功隐藏此警告。 Any ideas why?
有什么想法吗? I have already read the documentation and I don't want to use any inline configuration.
我已经阅读了文档,并且不想使用任何内联配置。
Thanks to melchor629 for finding an answer. 感谢melchor629找到答案。 Setting
设置
"esversion": 6
“ esversion”:6
in my .jshintrc file fixed the problem. 我的.jshintrc文件中的问题已解决。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.