Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to disable the "laxcomma" check?

I'm using SublimeLintern package, but I'm experiencing some issues. I would like to toggle that "laxcomma" warning that appears each time I save my files: I do prefer putting my commas at the beginning of each row

{
  "item1": val1
  ,"item2": val2
  ,"item3": val3
}

Hence, I tried to look for some piece of documentation that explained how to enable or disable each check. I bumped into this that should explain what I need. So, my SublimeLinter.sublime-settings is now like this:

{
    "jshint_options": {
        "laxcomma": false
    }
}

but it doesn't seem to be working. I still see that bothering warning! What's wrong with my settings?

like image 351
Bertuz Avatar asked Sep 18 '13 21:09

Bertuz


2 Answers

Bizarre. For me, the issue was that I had a .jshintrc file in the local directory of my project. Despite the fact that laxcomma wasn't being overridden there EITHER, apparently it just completely overrides your jshint_options (or maybe it does a top-level extend and doesn't recursively merge the config objects...)

The solution was to add (to the local .jshintrc file):

"laxcomma": true

like image 55
mikermcneil Avatar answered Oct 07 '22 06:10

mikermcneil


The word "lax" means not strict or severe; if you want to put your commas at the beginning of each line, try setting "laxcomma" to true:

{
    "jshint_options": {
        "laxcomma": true
    }
}
like image 32
Cody Codes Avatar answered Oct 07 '22 05:10

Cody Codes