From 16fcfc5e4e8b336af8730524a9b0795e33ba3cee Mon Sep 17 00:00:00 2001 From: Mike Ratcliffe Date: Wed, 11 Sep 2024 18:07:19 +0100 Subject: [PATCH] build: Enable lint-staged --- .husky/pre-commit | 2 +- package.json | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index 5e6a7c9..87ea02a 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1 +1 @@ -npm run prettier:check +npm run pre-commit diff --git a/package.json b/package.json index b9f3f33..81cefe7 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "dist-win": "electron-builder -w", "dist-mac": "electron-builder -m", "dist-linux": "electron-builder -l", + "pre-commit": "lint-staged --concurrent false", "prettier:check": "prettier --check \"**/*.{css,js,json,md,twig,yml}\"", "prettier:format": "prettier --write \"**/*.{css,js,json,md,twig,yml}\"", "postdist": "npm run pack-win && npm run pack-mac", @@ -45,7 +46,10 @@ "prepare": "husky" }, "lint-staged": { - "{**/*,*}.{css,js,json,md,twig,yml}": "prettier --write" + "*.{css,html,js,json,md,twig,yml}": [ + "prettier --write", + "prettier --check" + ] }, "build": { "appId": "com.sidenoder.app",