How to turn off JSHint error in Webstorm?

javascript, webstorm

Solution

The issue here is that WebStorm generates internal warnings using JSHint, but this internal mechanism is entirely separate from enabling JSHint under Settings/Languages & Frameworks/JavaScript/Code Quality Tools/JSHint. (If you enable JSHint there, you'll get even more warnings, it seems like JSHint is basically running twice with different configurations.)

You need to configure the inspections in Settings/Editor/Inspections, then in the list on the right, find JavaScript/JavaScript validity issues. That worked for me to remove the Chai warnings. (I am using the WebStorm 11 EAP at the moment.)

Problem

I have the following error for my files in tests: `Expected an assignment or function call and instead saw an expression.` It is generated from Chai libraries asserts. How can I turn it off in Webstorm? It makes the line yellow and shows a warning.

Original source