Automated check to use as a guard against security risks and unused, missing or outdated dependencies.
Can be used standalone, but is highly customized for use by Frosti Boilerplates.
Utilizes npm audit to scan project dependencies for any know vulnerabilities.
Uses depcheck to look for any missing or unused dependencies in your projects package.json
file.
$ npm install @frosti/asguard
$ npm install @frosti/asguard -g
The recommended usage is as an npm script in conjunction with something like Husky to automatically run before pushing any code into source control:
{
"scripts": {
"check": "asguard"
},
"husky": {
"hooks": {
"pre-push": "npm run check"
}
},
}
If you prefer to just run your checks manually, you can also simply run Asguard directly:
$ asguard
$ npx asguard
By default Asguard will throw an error and exit with process.exit(1) if it encounters any problems.
If you would prefer to just show a warning instead of throwing an error, you can use the --warn
flag.
$ asguard --warn