diff --git a/.validate.json b/.validate.json new file mode 100644 index 0000000..b2f964b --- /dev/null +++ b/.validate.json @@ -0,0 +1,6 @@ +{ + "scripts": { + "lint": "jshint ." + }, + "pre-commit": ["lint", "validate", "test"] +} diff --git a/package.json b/package.json index 2d2d0e3..936ec02 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,10 @@ { "scripts": { - "test": "jest && mocha --compilers js:mocha-traceur tests/**/*.spec.js && jsxhint --jsx-only .", - "start": "npm install && bower install && gulp" + "test": "jest && mocha --compilers js:mocha-traceur tests/**/*.spec.js", + "start": "npm install && bower install && gulp", + "lint": "jsxhint --jsx-only ." }, + "pre-commit": ["lint"], "jest": { "testFileExtensions": [ "jest.js" @@ -23,6 +25,7 @@ "mocha": "^2.2.5", "mocha-sinon": "^1.1.4", "mocha-traceur": "^2.1.0", + "precommit-hook": "^2.0.1", "react-tools": "^0.13.3", "sinon": "^1.14.1" },