I love the idea of a built in linter in Sublime but have run into a bit of a problem.
I've been sniffing around in the source code and googled for a half day but can't find anything anywhere, which makes me think that it might be impossible today. Could also be my google-fu that is weak so close to the holiday.
Is there a way to configure a project so SublimeLinter understands that some javascript variables are global and should not be errors in such a way that is implied on JSHint.com,
var result = JSHINT(source, options, globals);
/*global DISQUS:true, jQuery:false */
Is there a setting which takes care of this? Example below.
example.sublime-project
- Code: Select all
{
"settings":
{
"SublimeLinter":
{
"jshint_options":
{
// enforcing
"eqeqeq": true,
"immed": true,
"trailing": true,
"strict": true,
// relaxing
"evil": true,
"es5": true,
"regexdash": true,
"sub": true,
// environment
"browser": true,
"devel": true,
"wsh": false
},
// global
"jshint_global":
{
"sp": true,
"exports": true
}
}
}
}
Cheers,
gabbon