Sharing configuration
A repository with many projects usually wants one set of rules, with exceptions where they are earned. skif merges
every skif.toml from a project up to the git repository root, so the policy is written once and each project adds
to it. The configuration reference lists every key; this
page walks through a repository.
acme/ .git is here skif.toml organisation policy presets/node-cli.toml extended, never discovered apps/marketing-site/ single package, no file: organisation policy only legacy/old-portal/ no file: the legacy override below applies services/billing/ pnpm workspace skif.toml billing settings, inherits the organisation file packages/api/ packages/legacy-ui/skif.toml package file tools/codegen/skif.toml root = trueAn organisation file at the repository root
Section titled “An organisation file at the repository root”[lint]fail-on-warnings = true
[rules]unused-exports = "warn"
[[version-groups]]label = "one React"dependencies = ["react", "react-dom"]policy = "same-range"
[js]ignore-binaries = ["docker", "terraform"]Run skif -r from acme/, or skif inside any project: both give a project the same configuration.
Adding to it in a project
Section titled “Adding to it in a project”[workspace]extend-ignore-packages = ["@billing/sandbox-*"]
[rules]circular-imports = "error"
[[version-groups]]label = "stripe is pinned"dependencies = ["stripe"]policy = "pinned"pin = "14.21.0"
[js]extend-ignore-dependencies = ["@billing/fixtures"]Scalars replace what is inherited and tables merge key by key. Lists replace unless the key starts with extend-,
which appends. The stripe group is placed before the organisation’s groups, so it wins for stripe and the React
group still applies. Use reset = ["version-groups"] to drop the inherited groups instead.
Presets with extends
Section titled “Presets with extends”[rules]unused-exports = "off"
[[overrides]]packages = ["$ROOT/"][overrides.js]extend-ignore-binaries = ["node"]# any projectextends = ["../../presets/node-cli.toml"]Paths are relative to the file that declares them. $ROOT/ anchors a pattern at the project being linted, not at
presets/.
Per-package and per-directory overrides
Section titled “Per-package and per-directory overrides”[[overrides]]packages = ["./legacy/**"]max-level = "warn"[overrides.rules]unused-files = "off"
[[overrides]]files = ["**/src/generated/**"][overrides.rules]unused-exports = "off"Patterns here are relative to acme/ whichever project is linted. Overrides only change how diagnostics in the
selected packages or files are reported, and the JS inputs of those packages. Version groups, catalogs and the
other workspace-wide settings stay in the base file.
Package files
Section titled “Package files”[lint]max-level = "warn"
[rules]unused-dev-dependencies = "off"
[js]ignore = ["src/vendor/**"] # relative to this package
[[ignore]] # the package is the filterrules = ["unlisted-dependencies"]dependencies = ["jquery"]A package file holds package-scoped keys only. Anything workspace-wide is an error that names the key and says where it belongs.
Vendored and nested projects
Section titled “Vendored and nested projects”root = trueextends = ["../../../../skif.toml"]
[js]entry = ["bin/codegen.mjs"]root = true stops the upward search at this file, so billing’s settings do not apply. Extending the organisation
file brings its policy back. A vendored project with root = true and no extends uses only its own file.
Debugging with skif config
Section titled “Debugging with skif config”skif config --show # files applied, then the result and where each key was setskif config --explain rules.circular-imports.level # every file that touched the keyskif --config ci/skif.toml # use one file, skip discoveryskif --no-config # defaults plus flagsReach for --show whenever a result depends on files you did not open.