From 6c1eeab91a292e545333fa832c67cb455fc1ea51 Mon Sep 17 00:00:00 2001 From: jamesgeorge007 Date: Tue, 17 Dec 2019 23:29:54 +0530 Subject: [PATCH] feat: configure pre-commit hook --- package.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/package.json b/package.json index b9d6ce02fb..5a384b2f45 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,14 @@ "tsd": "tsc -p src/compiler --emitDeclarationOnly && tsc -p src/runtime --emitDeclarationOnly", "lint": "eslint \"{src,test}/**/*.{ts,js}\"" }, + "husky": { + "hooks": { + "pre-commit": "lint-staged" + } + }, + "lint-staged": { + "*{src,test}/**/*.{ts,js}": "npm run lint" + }, "repository": { "type": "git", "url": "https://github.com/sveltejs/svelte.git"