Single packages and monorepos
Workspace root
Section titled “Workspace root”skif [PATH] lints the workspace containing PATH (default .). The workspace root is the nearest ancestor of
PATH that declares a workspace: workspaces in package.json, or a pnpm-workspace.yaml. The root is used
for configuration, every reported path, every fix write and the install step, so the result does not depend on
the current directory.
skif.toml or .skif.toml is looked up in the workspace root only. There are no per-package configuration
files; per-package differences are expressed with [[ignore]], group selectors and [js.workspaces."<dir>"].
Package manager detection
Section titled “Package manager detection”First match wins:
[workspace] package-managerinskif.toml.- The root
package.jsonpackageManagerfield, thendevEngines.packageManager. - Lockfile presence:
pnpm-lock.yaml,bun.lock/bun.lockb,yarn.lock,package-lock.json. - A
pnpm-workspace.yamlimplies pnpm.
If nothing indicates a manager, skif does not guess npm. Rules and fixes that depend on the manager skip what
would be wrong for some manager; an npm workspace never receives a workspace:* specifier.
Workspace patterns
Section titled “Workspace patterns”Patterns follow pnpm semantics for every package manager: dir/* for direct children that contain a
package.json, dir/** for nested packages, and !pattern to remove matches. node_modules and
dot-directories are never entered.
Monorepo configuration
Section titled “Monorepo configuration”[workspace]ignore-packages = ["examples/*"]
[policy]prefer = "highest"
[[version-groups]]label = "Pin react across the repo"dependencies = ["react", "react-dom"]policy = "pinned"pin = "19.1.0"
[[semver-groups]]label = "Caret ranges for libraries"packages = ["packages/*"]range = "^"
[catalog]mode = "prefer"min-packages = 3Single packages
Section titled “Single packages”skif lints the workspace that contains the start path, so a package is linted as part of the nearest ancestor that
declares a workspace. If no ancestor declares one, skif exits with code 2 and says no workspace was found. A
standalone project therefore needs a root package.json with workspaces (or a pnpm-workspace.yaml) to be
linted. Rules that compare packages have little to compare in a one-package workspace; turn off those that do
not fit:
[rules]root-package-dependencies = "off"