design-system/deprecation
Summary
Flags tokens whose DTIF metadata includes a deprecated entry. Reports usages in string literal token paths (for example "colors.old") and CSS declaration values.
Configuration
Enable this rule in designlint.config.*:
json
{ "rules": { "design-system/deprecation": "error" } }Deprecation metadata is read from the DSR kernel. Seed the kernel from a DTIF catalog that marks tokens with $deprecated:
json
{
"$version": "1.0.0",
"color": {
"new": {
"$type": "color",
"$value": { "colorSpace": "srgb", "components": [1, 1, 1] }
},
"old": {
"$type": "color",
"$value": { "colorSpace": "srgb", "components": [0, 0, 0] },
"$deprecated": { "$replacement": "#/color/new" }
}
}
}bash
design-lint kernel start --config-path designlint.config.jsonOptions
No additional options.
This rule is auto-fixable for string literal token paths (e.g. "colors.old" → "colors.new"). CSS declaration values are reported but not auto-fixed.
Examples
Invalid
css
.button { color: colors.old; }ts
const color = "colors.old";Valid
css
.button { color: colors.new; }ts
const color = "colors.new";When Not To Use
If you do not track deprecated tokens, disable this rule.