Skip to content

Instantly share code, notes, and snippets.

@JesterXL
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JesterXL/a35a2020df99317e208b to your computer and use it in GitHub Desktop.
Save JesterXL/a35a2020df99317e208b to your computer and use it in GitHub Desktop.
Example Grunt jslint task
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jshint: {
all: ["Gruntfile.js"]
},
jscs: {
src: "*.js",
options: {
config: ".jscsrc",
requireCurlyBraces: [ "if" ]
}
}
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-jscs');
// Default task(s).
grunt.registerTask('default', ['jshint', 'jscs']);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment