2

So, when i'm using JSHint for my Ext.js project everytime i use Ext it is marked as 'Ext' is not defined by JSHint. How do i suppress this warning or integrate Ext.js into JSHint?

I have integrated the Ext sources into my project as an external library and code completion works, so Intellij knows about Ext.

SOLUTION:

@Nikos answer and the jshint documentation gave me the right direction. I have placed a file called .jshintrc in the root directory of my project. Content:

{
    "predef": [
        "Ext",
        "Ext5"
    ]
}

Second set intellij to use the .jshintrc file:

In settings -> Languages & Frameworks ->Javascript -> Code Quality Tools -> JSHint check the box on top right Use config file and choose the first entry "Default" to trigger intellij to use your config file instead of the internal configuration.

Now everything's working. Note that you have to place all additional jshint configuration now inside of the .jshintrc file.

pyriand3r
  • 667
  • 1
  • 8
  • 18

1 Answers1

2

You can do the following in your jshint.rc

 "jshint_options":
    {
        "globals": {
            "Ext": false
        }
     }
Nikos
  • 7,295
  • 7
  • 52
  • 88
  • Thanks, thats it. I should have looked in the jshint doc... But I followed the instructions there: I've created a `.jshintrc` file in the root directory and set the `predef` variable to ignore `Ext`. But the answer pushed me in the right direction. ;) – pyriand3r Jul 23 '14 at 10:11
  • @pyriand3r What exactly did you do? Can you show your config? Thanks! – Alfonso Nishikawa Jul 05 '15 at 12:00
  • 1
    @AlfonsoNishikawa I have updated my question with my solution. – pyriand3r Jul 08 '15 at 08:54