Migration Guide
Table of contents
v7 to v8 migration
v8 is a breaking release. The Design System Runtime (DSR) kernel is now the sole authoritative token source — inline config-based token loading no longer works. Every team upgrading from v7 must complete the following steps.
Step 1 — Update the dependency
pnpm add --save-dev @lapidist/design-lint@^8.0.0Step 2 — Run the migration codemod
The bundled codemod removes v7-only config keys and flags what needs manual attention:
pnpm exec design-lint migrate --config designlint.config.jsonThe codemod handles:
- Numeric severity codes (
0,1,2) → string equivalents ("off","warn","error") ignorePatterns→ignoreFileskey renameoverridesremoval (per-file overrides are not supported in v8)root,envremoval (no-ops in v8)tokensremoval — the codemod detects any inlinetokens:field, removes it from the config file, and prints instructions to seed the DSR kernel instead (see Step 3).
Step 3 — Start the DSR kernel and seed tokens
In v8 tokens come from the running DSR kernel, not from config files. Start the kernel and seed it from your DTIF token file:
# Start the kernel daemon (persists across terminal sessions)
design-lint kernel start --config-path designlint.config.jsonIf you previously passed a DTIF catalog path inside the config tokens field, you now pass the config that references it to kernel start. The daemon reads the token file paths and seeds the kernel's in-memory token graph automatically.
Verify the kernel is running:
design-lint kernel statusStep 4 — Update CI/CD pipelines
v8 CLI invocations require the kernel to be running before the lint command:
# .github/workflows/ci.yml
- name: Start DSR kernel
run: design-lint kernel start --config-path designlint.config.json
- name: Lint
run: design-lint "src/**/*"The kernel auto-starts on the first lint command if no socket is present, but explicit kernel start in CI is recommended for reliability.
Step 5 — Remove ConfigTokenProvider imports
ConfigTokenProvider is no longer part of the public API. If your codebase imports it directly:
// v7 — remove this
import { ConfigTokenProvider } from '@lapidist/design-lint/config';Replace with a DsrTokenProvider via createNodeEnvironment:
// v8
import { createNodeEnvironment, createLinter } from '@lapidist/design-lint';
const env = createNodeEnvironment(config, {
dsr: { socketPath: '/tmp/designlint-kernel.sock' },
});
const linter = createLinter(config, env);Breaking changes summary
| v7 | v8 |
|---|---|
config.tokens — inline DTIF token objects | Removed — use kernel start --config-path |
ConfigTokenProvider — public class | Removed from public API; internal only |
--no-kernel CLI flag | Removed |
--kernel CLI flag | Removed — kernel is always required |
Numeric severity (0, 1, 2) | Deprecated — use "off", "warn", "error" |
ignorePatterns config key | Renamed to ignoreFiles |
overrides config key | Removed — not supported |
root / env config keys | Removed — no-ops |
Adopting design-lint incrementally
If you are introducing design-lint into an existing codebase for the first time:
Install and initialize
pnpm add --save-dev @lapidist/design-lint
pnpm exec design-lint initStart the DSR kernel before your first lint run:
design-lint kernel start --config-path designlint.config.jsonRun once to establish a baseline:
pnpm exec design-lint "src/**/*"Start with warnings
Introduce new rules at warning severity so teams can ship while fixing existing debt:
{
"rules": {
"design-system/deprecation": "warn",
"design-token/colors": "warn"
}
}After violations trend down, promote to "error".
Prioritize auto-fix rules
pnpm exec design-lint "src/**/*" --fixBundle auto-fixed changes into small, reviewable commits before enabling stricter CI gates.
Recommended rollout order
- Structural guardrails (
design-system/import-path,design-system/component-prefix) - Deprecated usage cleanup (
design-system/deprecation) - Design token enforcement (
design-token/*) - Gate in CI for changed files, then the full repository