feat(mint): add legacy pattern detection to CSS audit prompt - #105
Draft
nujovich wants to merge 4 commits into
Draft
feat(mint): add legacy pattern detection to CSS audit prompt#105nujovich wants to merge 4 commits into
nujovich wants to merge 4 commits into
Conversation
5 tasks
Owner
Author
|
All milestones complete. Ready for review when you are. |
1 similar comment
Owner
Author
|
All milestones complete. Ready for review when you are. |
Owner
Author
|
BUILD 2026-08-09: All milestones complete. Ready for review when you are. |
Owner
Author
|
All milestones complete. Ready for review when you are. |
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.
Card: https://github.com/nujovich/mint-radar/issues/9
What: Extends the CSS audit with legacy pattern detection. Milestone 1 adds a new audit step (STEP 13) to
lib/prompts.mjsthat detects obsolete vendor prefixes (-webkit-, -moz-, -ms-, -o-), classic clearfix hacks, and IE-specific CSS hacks (*property, _property, filter:progid, expression()), and suggests modern replacements for each.Why: ReliCSS demonstrated strong demand for tools that identify CSS fossil patterns. Mint already performs semantic CSS auditing (colors, fonts, spacing, motion, layout a11y, modern practices, overflow safety) but has no awareness of legacy CSS artifacts that bloat stylesheets and complicate maintenance. Adding legacy pattern detection closes this gap, reinforcing Mint's positioning as a thorough CSS health auditor.
Milestones
Milestone 3 detail
Added
legacyPatternsto theLINT_CATEGORIESregistry inlib/audit-summary.mjs, making legacy pattern findings visible in both the CLI summary line (formatLintSummary) and the playgroundAuditView(collectLintGroups). TheAuditViewrenderer was extended to fall back toissue.suggestionwhenissue.reasonis not present (LegacyPatternIssue usessuggestionrather thanreason).Files changed:
lib/audit-summary.mjs— addedlegacyPatternsentry to LINT_CATEGORIES (key, shortLabel: 'legacy', label: 'Legacy CSS patterns')components/AuditView.tsx— madereasonoptional, addedsuggestionto LintIssue interface, render usesissue.reason || issue.suggestionlib/__tests__/audit-summary.test.mjs— added tests for formatLintSummary (legacy shortLabel) and collectLintGroups (legacyPatterns included, raw issues preserved)Milestone 4 detail
Added a CSS test fixture containing legacy patterns and integration tests:
lib/__tests__/helpers/legacy-css-fixture.css— test fixture with obsolete vendor prefixes, clearfix hacks, IE-specific hacks, and modern valid CSSlib/__tests__/prompts.test.mjs— updated to include STEP 13 in step count test, addedbuildAuditPrompt legacy patternsdescribe block with 5 testslib/__tests__/css-auditor.test.mjs— addedCssAuditor legacyPatterns integrationdescribe block with 3 testsTests
All 735 tests passing:
How to test:
npm test