I use jshint.vim and in the code like below I get an error “bad line breaking before ‘,'”
var a = 5
, b = 10;
How can I fix this? I found this question, but I’m not sure how can I use it to fix the problem in Vim. Is there any config file (except .vimrc) where I can set laxbreak or laxcomma?
Yes. I often use a leading comma style, and set the following preferences inside
~/.jshintrc:If you don’t already have a .jshintrc, those two settings enclosed in braces a la JSON will probably do the trick.