From dc170f10910b4e6d11cb64e9f68bc09a2e25452e Mon Sep 17 00:00:00 2001 From: Dirk Date: Fri, 19 Jul 2024 22:57:42 +0200 Subject: [PATCH] feat: add husky pre-commit hook --- .husky/pre-commit | 0 package-lock.json | 16 ++++++++++++++++ package.json | 4 +++- 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 .husky/pre-commit diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 0000000000..e69de29bb2 diff --git a/package-lock.json b/package-lock.json index 02fc1bb264..5f147fca5f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,6 +15,7 @@ "eslint-plugin-import": "2.29.1", "eslint-plugin-json": "3.1.0", "eslint-plugin-xwalk": "github:adobe-rnd/eslint-plugin-xwalk#v0.1.0", + "husky": "^9.1.1", "merge-json-cli": "github:buuhuu/merge-json-cli", "npm-run-all": "^4.1.5", "stylelint": "16.6.1", @@ -2371,6 +2372,21 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/husky": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.1.tgz", + "integrity": "sha512-fCqlqLXcBnXa/TJXmT93/A36tJsjdJkibQ1MuIiFyCCYUlpYpIaj2mv1w+3KR6Rzu1IC3slFTje5f6DUp2A2rg==", + "dev": true, + "bin": { + "husky": "bin.js" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/typicode" + } + }, "node_modules/ignore": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", diff --git a/package.json b/package.json index 261cb9c33b..feef10a51a 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,8 @@ "build:json": "npm-run-all -p build:json:models build:json:definitions build:json:filters", "build:json:models": "merge-json-cli -i 'models/_component-models.json' -o 'component-models.json'", "build:json:definitions": "merge-json-cli -i 'models/_component-definition.json' -o 'component-definition.json'", - "build:json:filters": "merge-json-cli -i 'models/_component-filters.json' -o 'component-filters.json'" + "build:json:filters": "merge-json-cli -i 'models/_component-filters.json' -o 'component-filters.json'", + "prepare": "husky" }, "repository": { "type": "git", @@ -29,6 +30,7 @@ "eslint-plugin-import": "2.29.1", "eslint-plugin-json": "3.1.0", "eslint-plugin-xwalk": "github:adobe-rnd/eslint-plugin-xwalk#v0.1.0", + "husky": "^9.1.1", "merge-json-cli": "github:buuhuu/merge-json-cli", "npm-run-all": "^4.1.5", "stylelint": "16.6.1",