SoniCoder
SoniCoder

Reputation: 4174

How to turn off JSHint error?

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 my .jshintrc file? I run a Gulp task based on it.

Upvotes: 0

Views: 712

Answers (2)

Mike Cluck
Mike Cluck

Reputation: 32521

Here's how you can silence it inside of a .jshintrc file.

{
  ...
  "expr": true
  ...
}

Source: http://jshint.com/docs/options/#expr

Upvotes: 3

Kazekage Gaara
Kazekage Gaara

Reputation: 15052

You can add the following on top of the line that's generating the error :

/*jshint -W030 */

Reference : http://jslinterrors.com/expected-an-assignment-or-function-call

Upvotes: 3

Related Questions