Skip to content

chore: integrate stylelint to enforce design tokens and consistency#214

Merged
cdtinney merged 1 commit into
mainfrom
cdtinney/stylelint
Apr 29, 2026
Merged

chore: integrate stylelint to enforce design tokens and consistency#214
cdtinney merged 1 commit into
mainfrom
cdtinney/stylelint

Conversation

@cdtinney
Copy link
Copy Markdown
Owner

Summary

Adds stylelint to the client package to catch CSS hard-coding, inconsistency, and duplication. Enforces that color, background, box-shadow, and z-index declarations use CSS variables from the existing token system in index.css.

  • stylelint-config-standard for baseline rules, stylelint-config-recess-order for property ordering
  • stylelint-declaration-strict-value plugin requires variables for color/background/box-shadow/z-index (gradients, transparent, currentColor exempt)
  • New tokens: --color-text-on-accent (replaces three hard-coded #fff), --color-error (replaces #f44336), --z-overlay-base (replaces magic z-index: 1)
  • Rainbow gradient in CoverOverlay.css kept inline with a comment noting it is a single decorative animation, not reusable colors
  • Auto-fix applied across all 16 CSS files for consistent property ordering
  • New CI step Lint CSS in the client job blocks PRs to main on stylelint errors

Testing

  • pnpm client:lint:css exits 0
  • pnpm format:check passes
  • pnpm client:build succeeds
  • pnpm client:test passes 26/26
  • Visual regression: build output renders identically (only property ordering and rgba() -> rgb() notation changes; both are equivalent)

- Add stylelint with stylelint-config-standard, stylelint-config-recess-order,
  and stylelint-declaration-strict-value plugin
- Configure strict-value to require CSS variables for color/background/box-shadow/z-index
- Add --color-text-on-accent, --color-error, --z-overlay-base tokens
- Replace previously hard-coded values with the new tokens
- Run --fix to apply consistent property ordering across all CSS files
- Wire pnpm client:lint:css into the CI client job so PRs are gated on it
@cdtinney cdtinney force-pushed the cdtinney/stylelint branch from 77e6d3e to d52f9ed Compare April 29, 2026 06:29
@cdtinney cdtinney marked this pull request as ready for review April 29, 2026 18:02
@cdtinney cdtinney merged commit 80651a6 into main Apr 29, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant