Skip to content
Browse files

Adding pre-commit hook script

  • Loading branch information...
1 parent db04bdd commit c29441f6f1c1f9f9d94bff4049e06fcdcac74b0d @arthurakay committed Dec 12, 2012
Showing with 34 additions and 0 deletions.
  1. +34 −0 hooks/pre-commit.js
View
34 hooks/pre-commit.js
@@ -0,0 +1,34 @@
+var LintRoller = require('../lintroller');
+
+var config = {
+ verbose : false,
+ stopOnFirstError : false,
+
+ //recursively include JS files in these folders
+ filepaths : [
+ '../'
+ ],
+
+ //but ignore anything in these folders
+ exclusions : [
+ '../node_modules/',
+ '../assets/',
+ '../docs/'
+ ],
+
+ jsLint : {
+ optons : {}
+ },
+
+ //optionally disable a linter
+ jsHint : false
+};
+
+try {
+ LintRoller.init(config);
+}
+catch (e) {
+ console.log('\nAn error has been caught:\n\n');
+ console.log(e);
+ process.exit(1);
+}

0 comments on commit c29441f

Please sign in to comment.
Something went wrong with that request. Please try again.