From eaa32b6a728e9df8cc1a78277a78be350fa2be0f Mon Sep 17 00:00:00 2001 From: Sergey <2901744+evercoinx@users.noreply.github.com> Date: Thu, 29 Aug 2024 11:59:48 +0200 Subject: [PATCH] Add local pipeline --- .husky/pre-commit | 1 + package-lock.json | 22 ++++++++++++++++++++++ package.json | 5 ++--- 3 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 .husky/pre-commit diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 00000000..45f5d67e --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1 @@ +npm run check && npm test diff --git a/package-lock.json b/package-lock.json index 2d824b5d..66dd318e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,6 +40,7 @@ "hardhat": "^2.6.4", "hardhat-contract-sizer": "^2.5.1", "hardhat-gas-reporter": "^1.0.8", + "husky": "^9.1.5", "prettier": "^2.6.2", "prettier-plugin-solidity": "^1.0.0-beta.19", "solc": "^0.8.2", @@ -15591,6 +15592,21 @@ "node": ">= 6" } }, + "node_modules/husky": { + "version": "9.1.5", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.5.tgz", + "integrity": "sha512-rowAVRUBfI0b4+niA4SJMhfQwc107VLkBUgEYYAOQAbqDCnra1nYh83hF/MDmhYs9t9n1E3DuKOrs2LYNC+0Ag==", + "dev": true, + "bin": { + "husky": "bin.js" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/typicode" + } + }, "node_modules/iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -31701,6 +31717,12 @@ "debug": "4" } }, + "husky": { + "version": "9.1.5", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.5.tgz", + "integrity": "sha512-rowAVRUBfI0b4+niA4SJMhfQwc107VLkBUgEYYAOQAbqDCnra1nYh83hF/MDmhYs9t9n1E3DuKOrs2LYNC+0Ag==", + "dev": true + }, "iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", diff --git a/package.json b/package.json index f84f212a..fee2473a 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "0.1.0", "description": "MaticX contracts", "scripts": { + "prepare": "husky", "format": "npm run prettier-sol && npm run prettier-ts", "prettier-sol": "prettier --write 'contracts/**/*.sol'", "prettier-ts": "prettier --write 'scripts/**/*.ts' 'test/**/*.ts'", @@ -27,9 +28,6 @@ "url": "https://github.com/stader-labs/maticX/issues" }, "homepage": "https://github.com/stader-labs/maticX#readme", - "engines": { - "node": "16" - }, "type": "commonjs", "devDependencies": { "@nomiclabs/hardhat-ethers": "^2.0.2", @@ -63,6 +61,7 @@ "hardhat": "^2.6.4", "hardhat-contract-sizer": "^2.5.1", "hardhat-gas-reporter": "^1.0.8", + "husky": "^9.1.5", "prettier": "^2.6.2", "prettier-plugin-solidity": "^1.0.0-beta.19", "solc": "^0.8.2",