Skip to content

Instantly share code, notes, and snippets.

@sprice
Created August 17, 2012 20:00
Show Gist options
  • Save sprice/3382068 to your computer and use it in GitHub Desktop.
Save sprice/3382068 to your computer and use it in GitHub Desktop.
/*global desc, task, jake, fail, complete */
(function() {
"use strict";
desc("Build");
task("default", ["lint"], function() {});
desc("Lint");
task("lint", [], function() {
var lint = require("./build/lint/lint_runner.js");
var files = new jake.FileList();
files.include("*.js");
files.include("*/**/*.js");
files.exclude("libraries/**/*.js");
var options = nodeLintOptions();
var passed = lint.validateFileList(files.toArray(), options, {});
if (!passed) fail("Lint failed.");
});
function nodeLintOptions() {
return {
bitwise: true,
curly: false,
eqeqeq: true,
forin: true,
immed: true,
latedef: true,
newcap: true,
noarg: true,
noempty: true,
nonew: true,
regexp: true,
undef: true,
strict: false,
trailing: true,
jquery: true,
browser: true,
node: true,
predef: [
"Drupal"
]
};
}
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment