@zuke/cspell

← API reference

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

Symbols

#

CspellSettings

class
class CspellSettings extends ToolSettings

Settings for a cspell lint run.

MemberSignatureDoc
files files(...globs: PathLike[]): this Files or globs to check (positional); repeatable.
config config(path: PathLike): this Use an explicit config file (-c/--config).
noProgress noProgress(): this Suppress the progress output (--no-progress).
noSummary noSummary(): this Suppress the summary line (--no-summary).
showSuggestions showSuggestions(): this Print spelling suggestions for each issue (--show-suggestions).
showContext showContext(): this Print the surrounding line for each issue (--show-context).
quietOutput quietOutput(): this Only emit issues, hiding informational output (--quiet).
cache cache(): this Cache results between runs (--cache).
dot dot(): this Include dotfiles and dot-directories (--dot).
gitignore gitignore(): this Honour .gitignore files (--gitignore).
gitignoreRoot gitignoreRoot(path: PathLike): this Stop the .gitignore search at this directory (--gitignore-root). Without it cspell keeps walking up past the repository root and can pick up an unrelated .gitignore from a parent directory — so a run inside a git worktree, whose checkout lives outside the main working tree, sees ignore rules that do not belong to it. Point this at the repository root to bound the search.
noMustFindFiles noMustFindFiles(): this Exit successfully when a glob matches nothing (--no-must-find-files). cspell fails by default if any file argument matched no files. A run scoped to a computed file list — the staged files, the files a diff touched — can legitimately be empty, so a file-scoped run wants this.
unique unique(): this Report each unique issue only once (--unique).
locale locale(value: string): this Restrict to a locale, e.g. en,en-GB (--locale).
exclude exclude(glob: string): this Exclude files matching a glob (-e/--exclude); repeatable.
maxDuplicateProblems maxDuplicateProblems(count: number): this Cap the number of duplicate problems reported (--max-duplicate-problems).
#

CspellTasks

const
const CspellTasks: CspellTasksApi

Typed task functions for the cspell spell-checker.

#

CspellTasksApi

interface
interface CspellTasksApi

The shape of CspellTasks.

MemberSignatureDoc
lint lint(configure?: Configure<CspellSettings>): Promise<CommandOutput> Spell-check with cspell lint.