From 0937372f32d3e7d55ccacc8a2a7fe9122231d52e Mon Sep 17 00:00:00 2001 From: Brook Elgie Date: Fri, 4 Jun 2021 08:05:27 +0100 Subject: [PATCH] Move pre-commit hook to husky.hooks in package.json Fixes deprecated use. --- package.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 2dc965d..cea8ee5 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,6 @@ "main": "src/index.js", "scripts": { "build": "ncc build src/main.js", - "precommit": "npm run build && git add dist/", "lint": "eslint 'src/**.js' 'tests/**.js' --fix", "test": "eslint 'src/**.js' 'tests/**.js' && jest --coverage", "test:watch": "npm run test -- --watchAll" @@ -45,5 +44,10 @@ "prettier": "^2.3.0", "husky": "^3.0.9", "jest": "^24.9.0" + }, + "husky": { + "hooks": { + "pre-commit": "npm run build && git add dist/" + } } }