How to pass the '$' is not defined error?


#1

I just begin to test my app, and got many ‘' is not defined errors. In the .jshintrc file, '’ is in the predef array.
Do I have to use Ember.$?

{
  "predef": [
    "document",
    "window",
    "location",
    "setTimeout",
    "$",
    "-Promise",
    "define",
    "console",
    "visit",
    "exists",
    "fillIn",
    "click",
    "keyEvent",
    "triggerEvent",
    "find",
    "findWithAssert",
    "wait",
    "DS",
    "andThen",
    "currentURL",
    "currentPath",
    "currentRouteName"
  ],
  "node": false,
  "browser": false,
  "boss": true,
  "curly": false,
  "debug": false,
  "devel": false,
  "eqeqeq": true,
  "evil": true,
  "forin": false,
  "immed": false,
  "laxbreak": false,
  "newcap": true,
  "noarg": true,
  "noempty": false,
  "nonew": false,
  "nomen": false,
  "onevar": false,
  "plusplus": false,
  "regexp": false,
  "undef": true,
  "sub": true,
  "strict": false,
  "white": false,
  "eqnull": true,
  "esnext": true
}

#2

I use Ember.$ instead. And if you’re in a Component, always use this.$