node-shellcheck
TypeScript icon, indicating that this package has built-in type declarations

0.6.2 • Public • Published

ShellCheck

Node 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.

const shellcheck = require("node-shellcheck");
shellcheck("tests/example.bash");

Installation

yarn add --dev shellcheck

Usage

Edit package.json to call shellcheck from your npm/yarn scripts:

{
  "scripts": {
    "lint": "shellcheck '**/*.sh'"
  }
}

Related

  • hadolint: Lint Dockerfiles and the inline bash code in them

License

/node-shellcheck/

    Package Sidebar

    Install

    npm i node-shellcheck

    Weekly Downloads

    9

    Version

    0.6.2

    License

    MIT

    Unpacked Size

    12.4 kB

    Total Files

    16

    Last publish

    Collaborators

    • jvaneenwyk