Skip to content

Lints

FieldValue
TypeSkill Resource
Source~/.copilot/skills/design/lints.toml
DescriptionNot specified

Source Content

# Lint registry for scripts/lint.py — the extension point.
# Add a lint: append a [[lint]] block. No code changes needed.
#
# Fields:
# name — shown in the summary table.
# globs — files this lint applies to. A lint whose file type didn't
# change never runs.
# command — {skill} expands to this skill's directory; {files} to the
# matched files. If the first token isn't an installed tool,
# the lint is skipped with a warning, never failed.
# required — true: a non-zero exit fails the run. false: advisory.
# note — one line of context, echoed when the lint runs.
[[lint]]
name = "stylelint"
globs = ["**/*.css"]
command = "{skill}/scripts/lint_css.sh {files}"
required = true
note = "Stylelint (degrades to a warning if not installed) — BEM+Tailwind split, token-only colors, symmetric padding"
[[lint]]
name = "contrast"
globs = ["**/*.css"]
command = "python3 {skill}/scripts/check_contrast.py {files}"
required = true
note = "real WCAG luminance/ratio math on every declared text/surface token pair — not a heuristic"
[[lint]]
name = "theme-completeness"
globs = ["**/*.css"]
command = "python3 {skill}/scripts/check_theme_completeness.py {files}"
required = true
note = "every token overridden in one theme must be overridden in all themes"
[[lint]]
name = "css-budget"
globs = ["**/*.css"]
command = "python3 {skill}/scripts/check_css_budget.py {files}"
required = false
note = "file size and @import-depth budget — advisory, a size warning shouldn't block a PR"
[[lint]]
name = "colocation"
globs = ["**/*.css", "**/*.tsx", "**/*.jsx"]
command = "python3 {skill}/scripts/check_colocation.py {files}"
required = false
note = "every component folder should own its own .css — advisory since some components legitimately share a stylesheet"
[[lint]]
name = "icon-and-border"
globs = ["**/*.tsx", "**/*.jsx"]
command = "bash {skill}/scripts/lint_design_principles.sh {files}"
required = true
note = "ADR-009 icon-grid + ADR-008 single-border heuristic (grep-based; an ast-grep-based upgrade is the next step once that tool is standard here)"
[[lint]]
name = "tokens"
globs = ["**/*.tsx", "**/*.jsx", "**/*.css"]
command = "bash {skill}/scripts/lint_tokens.sh {files}"
required = true
note = "raw hex/palette colors, non-system fonts, arbitrary radius values"