fbzhong/sublime-jslint — Issue #7: Ability to choose jslint?
Author: deitch
Created: 2012-01-29 11:13:55+00:00
State: open

Robin,

Nice job wrapping jslint into ST2. But sometimes you want to run your own version, e.g.

jsc jscjslint.js

on the Mac (which is Crockford's official version, and is much faster than launching Java). So how about having an option for your own command? In jslint.py, lines 34-38, have the following:

if (s.get('jslintcmd','')) > 0:
jslintcmd = s.get('jslintcmd');
else
if len(s.get('jslint_jar', '')) > 0:
jslint_jar = s.get('jslint_jar')
else:
jslint_jar = sublime.packages_path() + '/sublime-jslint/jslint4java-2.0.1.jar'
jslintcmd = 'java -jar "'+jslint_jar;
cmd = jslintcmd + s.get('jslint_options', '') + ' "' + file_path + '"'

Might have made some typos here, but this says:
- if you want to specify your own jslint command, go ahead
- if you don't, we will use java -jar, and then jslint_jar option makes sense.