Remove need to manually compile JS binary for hashFiles utility (#2770)

* Add in pre-commit hook and husky integration to compile the js binary on commit

* Lint/format before build
This commit is contained in:
Ryan van Zeben
2023-08-24 10:14:11 -04:00
committed by GitHub
parent 7b53c38294
commit 8dd2cec3af
6 changed files with 1572 additions and 573 deletions

View File

@@ -9,7 +9,9 @@
"format-check": "prettier --check **/*.ts",
"lint": "eslint src/**/*.ts",
"pack": "ncc build -o ../../layoutbin/hashFiles",
"all": "npm run build && npm run format && npm run lint && npm run pack"
"all": "npm run format && npm run lint && npm run build && npm run pack",
"prepare": "cd ../../../../ && husky install"
},
"repository": {
"type": "git",
@@ -18,6 +20,16 @@
"keywords": [
"actions"
],
"lint-staged": {
"*.md": [
"prettier --write",
"git add ."
],
"*.{ts,json}": [
"sh -c 'npm run all'",
"git add ."
]
},
"author": "GitHub Actions",
"license": "MIT",
"dependencies": {
@@ -31,7 +43,9 @@
"eslint": "^8.47.0",
"eslint-plugin-github": "^4.9.2",
"eslint-plugin-prettier": "^5.0.0",
"prettier": "^3.0.2",
"typescript": "^5.1.6"
"prettier": "^3.0.1",
"typescript": "^5.1.6",
"husky": "^8.0.3",
"lint-staged": "^14.0.0"
}
}
}