Answers:
为了进一步扩展,.jshintrc以下是Mocha 的设置:
{
  ....
  "globals"   : {
    /* MOCHA */
    "describe"   : false,
    "it"         : false,
    "before"     : false,
    "beforeEach" : false,
    "after"      : false,
    "afterEach"  : false
  }
}在JSHint Docs中-false(缺省值)表示变量是只读的。
如果仅为特定文件定义全局变量,则可以执行以下操作:
/*global describe, it, before, beforeEach, after, afterEach */将此添加到您的.jshintrc中
"predef" : ["define"]   // Custom globals for requirejs晚了,但是在您的jshintrc:中使用此选项:
"dojo": true您将在没有红色警告的情况下和平休息...
{"mocha": true}2.5.1+ github.com/jshint/jshint/issues/1330