9

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.
George Jor
  • 501
  • 1
  • 7
  • 18
  • possible duplicate of [How to disable the warning 'define' is not defined using JSHint and RequireJS](http://stackoverflow.com/questions/16260779/how-to-disable-the-warning-define-is-not-defined-using-jshint-and-requirejs) – mles Jan 28 '15 at 19:30

1 Answers1

16

Add moment to the globals configuration of your .jshint file

    {
      ..,
      "globals": {
         ..,
         "moment" : false
      }
    }
Andre Paap
  • 751
  • 5
  • 9