Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to define custom package in angular with out jshint warning?

I've just installed moment.js into my angularjs app.

But the jshint keep warning that moment is not defined.

  public/js/services/notifications.js
 16 |        console.log(moment.locale('fr'));
                         ^ 'moment' is not defined.
like image 622
George Jor Avatar asked Aug 10 '14 09:08

George Jor


1 Answers

Add moment to the globals configuration of your .jshint file

    {
      ..,
      "globals": {
         ..,
         "moment" : false
      }
    }
like image 64
Andre Paap Avatar answered Nov 07 '22 17:11

Andre Paap