如何使用jshint警告定义角度自定义包?

Geo*_*Jor 9 jshint angularjs

我刚刚将moment.js安装到我的angularjs应用程序中.

但jshint一直警告说没有定义时刻.

  public/js/services/notifications.js
 16 |        console.log(moment.locale('fr'));
                         ^ 'moment' is not defined.
Run Code Online (Sandbox Code Playgroud)

小智 16

为.jshint文件的全局配置添加时刻

    {
      ..,
      "globals": {
         ..,
         "moment" : false
      }
    }
Run Code Online (Sandbox Code Playgroud)