Wrapper to download shellcheck
npm install node-shellcheckNode wrapper of ShellCheck, a GPLv3 tool that gives warnings and suggestions for bash/sh shell scripts.
This package downloads koalaman's shellcheck from the official servers and makes the binary available at node_modules/.bin/shellcheck. There is also a NodeJS module available so you can execute directly from JavaScript.
``javascript`
const shellcheck = require("node-shellcheck");
shellcheck("tests/example.bash");
`sh`
yarn add --dev shellcheck
Edit package.json to call shellcheck from your npm/yarn scripts:
`json``
{
"scripts": {
"lint": "shellcheck '*/.sh'"
}
}
- hadolint: Lint Dockerfiles and the inline bash code in them