Registry / testing / lint-staged-shellcheck

lint-staged-shellcheck

JSON →
library0.1.2jsnpmunverified

A shim to run shellcheck on staged shell files via lint-staged, supporting shebang detection and filename patterns. Version 0.1.2 (latest). Stable but low activity. Key differentiator: works around lint-staged's lack of shebang-based file matching, allowing shell scripts without .sh extension to be checked. Ignores via .shellcheckignore. Requires shellcheck binary and lint-staged as peer.

npm install lint-staged-shellcheck
INSTALL
IMPORT
SIG · LINT-STAGED-SHELLC
L
lint-staged-shellcheck
testingjavascriptv0.1.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

lint-staged-shellcheck
npx lint-staged-shellcheck
require('lint-staged-shellcheck')
This package is a CLI tool, not a JS module. Use via npx or as a lint-staged command.
default
"lint-staged-shellcheck"
"lint-staged-shellcheck --some-flag"
The command is added verbatim as a lint-staged task, typically under a '*' glob rule.

Configure lint-staged to run lint-staged-shellcheck on all files, which filters shell scripts by shebang or .sh/.bash/.zsh extension.

// package.json { "lint-staged": { "*": [ "lint-staged-shellcheck" ] } } // Then in terminal: npx lint-staged
Debug
Known issues
gotchalint-staged-shellcheck does NOT auto-install shellcheck binary; you must install it separately via brew, apt, etc.
fix
Install shellcheck: brew install shellcheck (macOS) or apt install shellcheck (Linux).
affects: all
gotchaThis package only works as a lint-staged command; it cannot run standalone without lint-staged's staged file context.
fix
Ensure lint-staged is configured as the runner.
affects: all
deprecatedNode.js versions < 10 are not supported; package uses modern syntax.
fix
Upgrade Node.js to >= 10.
affects: all
Errors
Common errors & fixes
shellcheck: command not found
shellcheck binary not installed on the system.
fix
Install shellcheck: brew install shellcheck (macOS) or apt install shellcheck (Linux).
No staged files found
lint-staged is not passing any files to the command, or the '*' glob is missing.
fix
Ensure lint-staged config has a '*' rule that includes 'lint-staged-shellcheck'.
Upgrade
Version history
0.1.2latest on npm
Audit
Dependencies
lint-stagedrequiredpeer dependency, requires lint-staged to operate
Agent activity
11 hits · last 30 days
node
10
Amazon
1
Resources
lint-staged-shellcheck — npm install lint-staged-shellcheck · libregistry