chore: integrate stylelint to enforce design tokens and consistency#214
Merged
Conversation
- 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
77e6d3e to
d52f9ed
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
--color-text-on-accent(replaces three hard-coded#fff),--color-error(replaces#f44336),--z-overlay-base(replaces magicz-index: 1)Lint CSSin the client job blocks PRs to main on stylelint errorsTesting
pnpm client:lint:cssexits 0pnpm format:checkpassespnpm client:buildsucceedspnpm client:testpasses 26/26rgba()->rgb()notation changes; both are equivalent)