如何配置jshint不会给我错误“前一行坏线”? [英] How do I configure jshint to not give me the error "Bad line breaking before"?
本文介绍了如何配置jshint不会给我错误“前一行坏线”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
它给了我错误在'之前坏线','因为我有以下代码
It's giving me the error "Bad line breaking before ','" because I have code like the following
var one = 1
, two = 2
, three = 3
;
如果我把,
放在最后该行而不是下一个的开头,它不会抱怨。但我想以这种方式编码。有没有办法可以让它不显示这个警告?
If I put the ,
at the end of the line instead of the beginning of the next, it doesn't complain. But I want to code this way. Is there a way I can make it not show this warning?
我看了一眼 JSHint的选项但没有任何与此错误相关的内容。
I looked though JSHint's options but there isn't anything pertaining to this error.
推荐答案
正如 laxbreak
回答, laxcomma
选项实际应该用于此特定情况(已实施)同时)。有关详细信息,请参见 http://jshint.com/docs/options/ 。
这篇关于如何配置jshint不会给我错误“前一行坏线”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文