From 4257e456423c66f566ceb9e38176ac534e139d95 Mon Sep 17 00:00:00 2001 From: Julian Simioni Date: Sat, 3 Nov 2018 08:28:40 -0400 Subject: [PATCH] chore(test): Add precommit-hook This was never set up, and thus we have not been linting code in this repository. Fixes https://github.com/pelias/schema/issues/311 --- package.json | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0ad456a4..00b1a09b 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,9 @@ "drop_index": "node scripts/drop_index", "reset_type": "node scripts/reset_type", "update_settings": "node scripts/update_settings", - "travis": "npm run test && npm run integration" + "travis": "npm run test && npm run integration", + "lint": "jshint .", + "validate": "npm ls" }, "repository": { "type": "git", @@ -43,11 +45,17 @@ "devDependencies": { "difflet": "^1.0.1", "elastictest": "^2.0.0", + "precommit-hook": "^3.0.0", "proxyquire": "^2.0.0", "tap-spec": "^5.0.0", "tape": "^4.5.0" }, - "pre-commit": [], + "pre-commit": [ + "lint", + "prune", + "validate", + "test" + ], "release": { "branch": "master", "success": []