Skip to content

Instantly share code, notes, and snippets.

@nacho4d
Created October 15, 2012 15:54
Show Gist options
  • Save nacho4d/3893245 to your computer and use it in GitHub Desktop.
Save nacho4d/3893245 to your computer and use it in GitHub Desktop.
JSLint sublime text build system file
{
"cmd": ["jsl", "-process", "$file", "-nologo", "-nocontext", "-nofilelisting"],
"file_regex": "^(.+\\.js)\\((\\d+)\\): (.+)$",
"selector": "source.js",
"osx": {
"path": "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"
}
}
// Above settings are for output of the form:
// ==========================================
//
// /Users/nacho4d/Desktop/EpisodeFeedParser.js(13): lint warning: nested comment
// /Users/nacho4d/Desktop/EpisodeFeedParser.js(121): SyntaxError: syntax error
// 1 error(s), 1 warning(s)
//
// Would be nice to support the full form of the output:
// =====================================================
//
// JavaScript Lint 0.3.0 (JavaScript-C 1.5 2004-09-24)
// Developed by Matthias Miller (http://www.JavaScriptLint.com)
//
// EpisodeFeedParser.js
// /Users/nacho4d/Desktop/EpisodeFeedParser.js(13): lint warning: nested comment
// number :/*
// ^
//
// /Users/nacho4d/Desktop/EpisodeFeedParser.js(121): SyntaxError: syntax error
// var subs = tds[3].getElementsByTagName("sup");
// ........................^
//
//
// 1 error(s), 1 warning(s)
//
// However "file_regex" needs adjustments so it recognises context lines too.
// This didn't work "^(.+\\.js)\((\\d+)\\): (.+\\r.*\\r.*\\r)$"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment