@zuke/husky

← API reference

`@zuke/husky` — typed `husky` task wrappers for Zuke builds.

Symbols

# HuskyInitSettings class
class HuskyInitSettings extends HuskySettings

Settings for husky init [dir] — scaffold husky in a project: create the hooks directory, add a sample pre-commit hook, and wire up the prepare script. This is the canonical husky v9 setup command.

MemberSignatureDoc
dir dir(path: PathLike): this The hooks directory to initialise (positional; defaults to .husky).
# HuskyInstallSettings class
class HuskyInstallSettings extends HuskySettings

Settings for installing Git hooks by invoking husky [dir] bare.

husky v9 removed the old install subcommand: running husky with no subcommand is what installs the hooks (an optional directory may follow). This task therefore emits the bare husky invocation — its default argv is just ["husky"], not ["husky", "install"].

MemberSignatureDoc
dir dir(path: PathLike): this The hooks directory to install into (positional; defaults to .husky).
# HuskySettings class
class HuskySettings extends ToolSettings

Shared base for every husky invocation: the binary and argv assembly.

# HuskyTasks const
const HuskyTasks: HuskyTasksApi

Typed task functions for the husky Git-hooks tool.

# HuskyTasksApi interface
interface HuskyTasksApi

The shape of HuskyTasks.

MemberSignatureDoc
init init(configure?: Configure<HuskyInitSettings>): Promise<CommandOutput> Scaffold husky in a project: husky init [dir].
install install(configure?: Configure<HuskyInstallSettings>): Promise<CommandOutput> Install Git hooks via the bare husky [dir] invocation (husky v9 removed the install subcommand).