How do I configure jshint to not give me the error “Bad line breaking before”?

后端 未结 2 965
日久生厌
日久生厌 2021-02-06 23:14

It\'s giving me the error \"Bad line breaking before \',\'\" because I have code like the following

var one = 1
  , two = 2
  , three = 3
  ;

I

相关标签:
2条回答
  • 2021-02-06 23:26

    laxbreak = true is the option to set.

    You can find the option on the main page of JSHint site as "About unsafe line breaks".

    0 讨论(0)
  • 2021-02-06 23:52

    As mentioned in the comments of the laxbreak answer, laxcomma option should actually be used for this particular situation (it has been implemented in the meantime). See http://jshint.com/docs/options/ for details.

    0 讨论(0)
提交回复
热议问题