zuke.tools.lint_staged
@zuke/lint-staged 1.0.0: @zuke/lint-staged — typed lint-staged task wrappers for Zuke builds.
zuke on PyPI ↗ 2 symbols
Symbols
class LintStagedSettings(ToolSettings) Settings for a lint-staged run.
-
config(path: str) -> SelfUse an explicit config file (
--config). -
relative() -> SelfPass file paths relative to the working directory rather than absolute (
--relative). Tools configured with root-relative globs — the usual case for an ESLint or Prettier config committed at the repo root — only match when the paths handed to them are relative too. -
concurrent(tasks: float) -> SelfRun at most
taskslinter tasks at once (--concurrent <n>). Use1to serialise them — what a tool that writes shared state (a cache, a lockfile) needs. -
allow_empty() -> SelfExit successfully when the tasks left nothing staged (
--allow-empty). Without it a formatter that reverts the only staged change fails the run, because the resulting commit would be empty. -
diff(ref: str) -> SelfTake the file list from a diff instead of the staged files (
--diff <ref>), e.g.main...HEADto lint everything a branch touched. -
shell() -> SelfRun the configured commands through a shell instead of parsing them (
--shell).
class LintStagedTasks Typed task functions for lint-staged.
-
static async run(ctx: ServiceContext, configure: Callable[[LintStagedSettings], LintStagedSettings] | None=None) -> ExecResultRun the configured linters over the staged files:
lint-staged.