diff --git a/src/features/housekeeping/foundation/shell/housekeeping-shell.test.tsx b/src/features/housekeeping/foundation/shell/housekeeping-shell.test.tsx index fdc88b7a..0aac7178 100644 --- a/src/features/housekeeping/foundation/shell/housekeeping-shell.test.tsx +++ b/src/features/housekeeping/foundation/shell/housekeeping-shell.test.tsx @@ -86,7 +86,7 @@ const structuralBoundaryRules = [ { label: "palette color", pattern: - /(?:bg|text|border|from|to)-(?:white|black|slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)(?:-\d{2,3})?/, + /(?:bg|text|border|from|via|to|ring|outline|fill|stroke|divide|shadow|accent|caret|decoration|placeholder)-(?:white|black|slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)(?:-\d{2,3})?/, }, { label: "hex color", pattern: new RegExp("#" + "[0-9a-fA-F]{3,8}") }, { @@ -302,4 +302,18 @@ describe("HousekeepingShell", () => { ), ).toContain("palette color"); }); + it("detects hard-coded Tailwind color utilities beyond foreground and backgrounds", () => { + for (const source of [ + 'className="ring-' + 'red-500"', + 'className="outline-' + 'blue-500"', + 'className="fill-' + 'green-500"', + 'className="stroke-' + 'purple-500"', + 'className="divide-' + 'amber-400"', + 'className="via-' + 'cyan-500"', + ]) { + expect(boundaryViolations(source, structuralBoundaryRules)).toContain( + "palette color", + ); + } + }); });