Skip to content

Instantly share code, notes, and snippets.

@caubry
Created February 11, 2014 22:23
Show Gist options
  • Save caubry/8945487 to your computer and use it in GitHub Desktop.
Save caubry/8945487 to your computer and use it in GitHub Desktop.
module.exports = function(grunt) {
grunt.initConfig({
jshint: {
files: ['js/*'],
options: {
// options here to override JSHint defaults
globals: {
jQuery: true,
console: true,
module: true,
document: true
}
}
},
githooks: {
all: {
'pre-commit': 'jshint'
}
}
});
// Load tasks
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-githooks');
// Register tasks
grunt.registerTask('default', ['githooks', 'jshint']);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment