Skip to content

Lints

FieldValue
TypeSkill Resource
Source~/.copilot/skills/frontend/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.
#
# Repo-scoped checks (check_frontend.sh, check_astro.sh, check_routes.sh) are
# NOT registered here — like backend's verify_scaffold.sh, they always
# inspect the whole target repo, not the matched files, so a per-file
# dispatch model doesn't fit. They stay separate SKILL.md entrypoints.
#
# check_controls.sh is also NOT registered: it takes exactly two positional
# args (a Component.tsx and its paired Component.stories.tsx), which a
# globbed {files} list can't reliably supply — a multi-component lint run
# would hand it the wrong pair. Run it by hand per component instead.
[[lint]]
name = "csf3-shape"
globs = ["**/*.stories.tsx"]
command = "bash {skill}/scripts/check_csf3.sh {files}"
required = true
note = "default meta/title/component, tags:['autodocs'], named Story exports, no CSF2 Template.bind"
[[lint]]
name = "storybook-hierarchy"
globs = ["**/*.stories.tsx"]
command = "bash {skill}/scripts/check_hierarchy.sh {files}"
required = true
note = "meta.title reads like Category/Name, not a filesystem path"
[[lint]]
name = "ds-component"
globs = ["**/components/ui/*.tsx", "**/components/patterns/*.tsx"]
command = "bash {skill}/scripts/lint_ds_component.sh {files}"
required = true
note = "Props JSDoc, CVA variants, cn() composition, sibling .stories.tsx, named-export shape (grep/awk — an ast-grep upgrade is the next step)"
[[lint]]
name = "zod-schema-boundary"
globs = ["**/contracts/**/*.ts", "**/schemas/**/*.ts"]
command = "bash {skill}/scripts/check_schema_boundary.sh {files}"
required = true
note = "every <Entity>Schema has a matching z.infer export; no z.any()"
[[lint]]
name = "frontend-design"
globs = ["**/*.tsx", "**/*.css"]
command = "python3 {skill}/scripts/check_frontend_design.py {files}"
required = false
note = "banned generic fonts, motion/interaction detail present — advisory, a static layout can be intentional"
[[lint]]
name = "perf-report"
globs = ["**/perf-report.md", "**/*.perf-report.md"]
command = "bash {skill}/scripts/check_perf_report.sh {files}"
required = false
note = "before/after metrics + referenced budget file must actually exist — advisory since not every PR ships a perf report"