Skip to content

Catch inline color literal patterns#141

Merged
chailandau merged 2 commits into
mainfrom
chai/detect-inline-colors
Jun 11, 2026
Merged

Catch inline color literal patterns#141
chailandau merged 2 commits into
mainfrom
chai/detect-inline-colors

Conversation

@chailandau

@chailandau chailandau commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Why

Ghost color checks could miss common literal forms like shorthand hex and named colors when the authored detector was narrower than the underlying design rule. The PR also captures a follow-up idea for CI and PR integration recipes.

What

  • Add a shared inline color literal matcher for shorthand hex and named color forms
  • Apply that matcher to color-oriented forbidden checks alongside the authored detector
  • Add CLI regression coverage and a patch changeset
  • Capture the CI / PR integration recipe idea under ideas/

It will now capture all variants of hex codes / css colors:
image
image
image

Risk Assessment

Low. This broadens findings for color-oriented forbidden checks, leaves required detectors and non-color checks unchanged, and adds a standalone idea note.

References

  • Pre-commit hook: pnpm check passed
  • Pre-push hook: pnpm build, pnpm check, and pnpm test passed
  • Idea note: ideas/ci-pr-integration-recipes.md

Generated with Codex

@chailandau chailandau marked this pull request as ready for review June 11, 2026 17:34
@chailandau chailandau requested a review from nahiyankhan as a code owner June 11, 2026 17:34
@chailandau chailandau merged commit a4b330d into main Jun 11, 2026
6 checks passed
@chailandau chailandau deleted the chai/detect-inline-colors branch June 11, 2026 17:37
@github-actions github-actions Bot mentioned this pull request Jun 11, 2026
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.

2 participants