Migration Guide
This guide helps teams introduce @lapidist/design-lint into an existing codebase with minimal disruption.
Table of contents
- Set a baseline
- Start with warnings
- Prioritize auto-fix rules
- Roll out strictness in phases
- Gate in CI
- Recommended rollout order
- See also
Set a baseline
Install and initialize design-lint, then run it once to understand the current violation volume:
npm install --save-dev @lapidist/design-lint
npx design-lint init
npx design-lint "src/**/*"Capture this first report as your migration baseline.
Start with warnings
When introducing new rules, prefer warning severity first so teams can ship while fixing existing debt:
{
"rules": {
"design-system/deprecation": "warn",
"design-token/colors": "warn"
}
}After violations trend down, promote the same rules to error.
Prioritize auto-fix rules
Run with --fix locally to remove easy violations early:
npx design-lint "src/**/*" --fixBundle these changes into small, reviewable commits before enabling stricter CI enforcement.
Roll out strictness in phases
A practical sequence is:
- Structural guardrails (
design-system/import-path,design-system/component-prefix) - Deprecated usage cleanup (
design-system/deprecation) - Design token enforcement (
design-token/*)
This order reduces churn and prevents repeated rewrites.
Gate in CI
Once critical rules are stable at error, run design-lint on pull requests to stop regressions.
Use the CI examples in the CI integration guide.
Recommended rollout order
- Enable selected rules as
warn - Run
--fixand commit low-risk automated changes - Resolve remaining warnings by area/team
- Promote stable rules from
warntoerror - Enforce in CI for changed files, then full repository