From 882d04c9bfee8c5bbd3c5ce7cd9035021b2bdf3f Mon Sep 17 00:00:00 2001 From: Erik Ziegler Date: Fri, 20 Sep 2019 13:44:52 +0200 Subject: [PATCH] chore: add husky for automatic linting of staged files (#938) --- package.json | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/package.json b/package.json index 4feea26baf3..49eccf664f7 100644 --- a/package.json +++ b/package.json @@ -99,6 +99,17 @@ "workbox-webpack-plugin": "^4.3.1", "worker-loader": "^2.0.0" }, + "husky": { + "hooks": { + "pre-commit": "lint-staged" + } + }, + "lint-staged": { + "src/**/*.{js,json,css}": [ + "prettier --write", + "git add" + ] + }, "resolutions": { "**/@babel/runtime": "7.5.5" }