Skip to content

Instantly share code, notes, and snippets.

@darrenderidder
Created July 19, 2012 14:15
Show Gist options
  • Save darrenderidder/3144234 to your computer and use it in GitHub Desktop.
Save darrenderidder/3144234 to your computer and use it in GitHub Desktop.
SublimeText 2 JSLint Build System
import sublime, sublime_plugin, re
class autojslint(sublime_plugin.EventListener):
def on_post_save(self, view):
settings = sublime.load_settings("autojslint.sublime-settings")
if re.search( settings.get( "filename_filter" ), view.file_name() ):
view.window().run_command( "build" )
{
"filename_filter": "(\\.css|\\.js|\\.json|\\.sass|\\.less)$"
}
{
"cmd": [
"/usr/local/bin/node",
"/usr/local/bin/jslint",
"--sloppy",
"--indent", "2",
"--node",
//"--forin",
"--nomen",
"--vars",
"--plusplus",
"--stupid",
"$file"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment