1
0
Fork 0
mirror of https://github.com/imjasonh/govulncheck-action synced 2026-07-07 00:12:55 +00:00

set up pre-commit

Signed-off-by: Jason Hall <jason@chainguard.dev>
This commit is contained in:
Jason Hall 2025-06-17 14:14:55 -04:00
parent 8f41db0dda
commit 5cf63fb3ad
Failed to extract signature
2 changed files with 19 additions and 3 deletions

3
.husky/pre-commit Executable file
View file

@ -0,0 +1,3 @@
npx lint-staged
npm run build
git add dist/

View file

@ -4,18 +4,26 @@
"description": "GitHub Action to run govulncheck and annotate vulnerabilities",
"main": "index.js",
"scripts": {
"build": "ncc build index.js -o dist",
"build": "ncc build src/index.js -o dist --source-map --license licenses.txt",
"test": "jest",
"lint": "eslint src/**/*.js",
"format": "prettier --write 'src/**/*.js'",
"format:check": "prettier --check 'src/**/*.js'",
"prepare": "husky",
"test:watch": "jest --watch",
"test:coverage": "jest --coverage",
"test:local": "node test-local.js"
},
"keywords": [
"github",
"action"
"action",
"govulncheck",
"vulnerability",
"security",
"go"
],
"author": "",
"license": "MIT",
"license": "Apache-2.0",
"dependencies": {
"@actions/core": "^1.10.1",
"@actions/github": "^6.0.0",
@ -39,5 +47,10 @@
"statements": 95
}
}
},
"lint-staged": {
"src/**/*.js": [
"prettier --write"
]
}
}