From c83f1563b44768956a642d76df81b5fd8c833b37 Mon Sep 17 00:00:00 2001 From: Darin Morrison Date: Thu, 21 Jul 2016 12:57:45 -0600 Subject: [PATCH] Hook scripts (#328) * Add commit hooks * Fix linter issue --- app/package.json | 3 ++- menu.js | 2 +- package.json | 8 ++++++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/app/package.json b/app/package.json index 25c71eff..97c24dfb 100644 --- a/app/package.json +++ b/app/package.json @@ -73,6 +73,7 @@ "scripts": { "dev": "webpack --watch", "lint": "eslint .", - "build": "NODE_ENV=production webpack" + "build": "NODE_ENV=production webpack", + "test": "npm run lint" } } diff --git a/menu.js b/menu.js index 9b088e8c..1c0b8677 100644 --- a/menu.js +++ b/menu.js @@ -91,7 +91,7 @@ module.exports = function createMenu ({ createWindow, updatePlugins }) { { label: 'Close Terminal Window', role: 'close', - accelerator: 'CmdOrCtrl+Shift+W', + accelerator: 'CmdOrCtrl+Shift+W' } ] }, diff --git a/package.json b/package.json index 8c0f55d1..2bc2739e 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,8 @@ "eslint-config-standard": "5.3.5", "eslint-plugin-promise": "2.0.0", "eslint-plugin-react": "5.2.2", - "eslint-plugin-standard": "2.0.0" + "eslint-plugin-standard": "2.0.0", + "husky": "0.11.4" }, "eslintConfig": { "extends": "standard", @@ -47,6 +48,9 @@ }, "scripts": { "start": "electron index", - "lint": "eslint ." + "lint": "eslint .", + "prepublish": "npm test", + "prepush": "npm test", + "test": "npm run lint" } }