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:
parent
8f41db0dda
commit
5cf63fb3ad
2 changed files with 19 additions and 3 deletions
3
.husky/pre-commit
Executable file
3
.husky/pre-commit
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
npx lint-staged
|
||||
npm run build
|
||||
git add dist/
|
||||
19
package.json
19
package.json
|
|
@ -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"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue