如何关闭JSHint错误? [英] How to turn off JSHint error?

查看:205
本文介绍了如何关闭JSHint错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在测试中我的文件出现以下错误: Expected an assignment or function call and instead saw an expression. 它是由柴库断言生成的.如何在.jshintrc文件中将其关闭?我基于它运行一个Gulp任务.

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.

推荐答案

在这里,您可以在.jshintrc文件中将其静音.

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

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

来源: http://jshint.com/docs/options/#expr

这篇关于如何关闭JSHint错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆