Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you configure JSHint options globally in Sublime Text 2?

I'd like to turn off particular warnings globally when using Sublime Text 2's JSHint plugin. For instance, "laxcomma".

I tried editing the .jshintrc file in JSHint's Sublime Packages folder, but this did not work.

{
  "laxcomma": true
}

Adding a project specific .jshintrc file with the same options solves the issue for that particular project, but I would like these options to be global.

Any suggestions?

like image 204
AndrewHenderson Avatar asked Jan 28 '13 19:01

AndrewHenderson


1 Answers

From the JSHint docs page: http://www.jshint.com/docs/

JSHint will look for this file in the current working directory and, if not found, will move one level up the directory tree all the way up to the filesystem root.

So, technically you could put a .jshintrc file at the root level of your filesystem (/.jshintrc) and every new project would default to those options. Individual projects could override them as needed.

like image 88
Philip Walton Avatar answered Sep 24 '22 06:09

Philip Walton