HomePhabricator
Diffusion Comm dbfcd8204985

[lint-staged] Add ShellCheck to `.lintstagedrc.js`

Description

[lint-staged] Add ShellCheck to .lintstagedrc.js

Summary:
Related Linear issue here. Adds a task for handling *.sh staged files and runs the same ShellCheck command we use in Buildkite/GitHub Actions. Because this we're running ShellCheck in the pre-commit stage, issues with shell scripts will be surfaced to developers earlier, which is ideal.

Depends on D4771 because the user needs ShellCheck installed locally.

Also depends on D4770 (related issue: ENG-1568) which adds ShellCheck to the Nix shell for developers using the Nix shell.

Test Plan:
Tested locally on macOS and works as expected:

Reviewers: atul, jon, inka

Reviewed By: atul

Subscribers: ashoat, tomek, adrian

Differential Revision: https://phab.comm.dev/D4772

Details

Provenance
aboshAuthored on Aug 8 2022, 9:34 AM
Reviewer
atul
Differential Revision
D4772: [lint-staged] Add ShellCheck to `.lintstagedrc.js`
Parents
rCOMMa6578e42469c: [docs] Add ShellCheck installation instructions
Branches
Unknown
Tags
Unknown