From b11f5bf70c64b6efbccc6e2846c52f599065a428 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Niedzi=C3=B3=C5=82ka?= Date: Fri, 24 Feb 2023 17:59:45 +0100 Subject: [PATCH] fix: Fix pre-commit hooks + run prettier (#1120) Fix pre-commit hooks --- .husky/pre-commit | 2 +- .lintstagedrc.json | 2 +- package.json | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index ccb4264c6..36af21989 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,4 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" -node node_modules/.bin/lint-staged +npx lint-staged diff --git a/.lintstagedrc.json b/.lintstagedrc.json index 7cb0e1cd6..5eaaa88c9 100644 --- a/.lintstagedrc.json +++ b/.lintstagedrc.json @@ -1,4 +1,4 @@ { "*": "prettier --ignore-unknown --write", - "*.{js,jsx,tsx}": "eslint --fix" + "*.{js,jsx,ts,tsx}": ["eslint --fix", "prettier --write"] } diff --git a/package.json b/package.json index bbe7f4ca2..53dc2f8b3 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,8 @@ "test": "npm run format && npm run lint && npm run jest", "jest": "JEST_PUPPETEER_CONFIG=jest-puppeteer.config.cjs NODE_OPTIONS=--experimental-vm-modules jest", "perf": "bundlesize", - "webpack": "webpack" + "webpack": "webpack", + "prepare": "husky install" }, "jest": { "preset": "jest-puppeteer"