staged
The rs staged command uses lint-staged to run tasks against files staged in Git.
A common use case is to run linters, formatters, or other checks on staged files before committing code.
Usage
The command loads the staged-file tasks registered with define.staged().
Options
--allow-empty
--allow-empty allows an empty commit when tasks revert all staged changes.
--concurrent
--concurrent (or -p) sets how many tasks run concurrently; use false to run them serially.
--cwd
--cwd sets the working directory used to run all tasks.
--debug
--debug (or -d) prints additional debug information.
--no-stash
--no-stash disables the backup stash and automatic reversion when a task fails.
--quiet
--quiet (or -q) disables lint-staged's own console output.
--relative
--relative (or -r) passes file paths relative to the working directory to tasks.
--verbose
--verbose (or -v) shows task output even when tasks succeed; by default, only output from failed tasks is displayed.
--help
--help (or -h) displays the command's usage and options.
Configuration
Configure staged-file tasks through define.staged() in the Rstack configuration file. It accepts the standard lint-staged configuration: