Skip to content

feat(mint): add logical properties migration audit types and mapping - #112

Draft
nujovich wants to merge 5 commits into
mainfrom
hermes/build/mint-logical-properties-migration
Draft

feat(mint): add logical properties migration audit types and mapping#112
nujovich wants to merge 5 commits into
mainfrom
hermes/build/mint-logical-properties-migration

Conversation

@nujovich

@nujovich nujovich commented Aug 31, 2026

Copy link
Copy Markdown
Owner

Card: https://github.com/nujovich/mint-radar/issues/19

What: Adds a deterministic logical properties migration audit to Mint. Milestone 1 introduces the LogicalPropertyIssue, LogicalPropertyAudit, and PHYSICAL_TO_LOGICAL mapping types in lib/types.ts, plus the logicalProperties field on AuditReport. The mapping covers 30+ physical CSS properties and their flow-relative equivalents (e.g. margin-left -> margin-inline-start, padding-right -> padding-inline-end, left -> inset-inline-start), plus directional keyword mappings (text-align: left -> text-align: start). Future milestones will implement the parser, wire CLI output, and add Stylelint 17.10-aligned tests.

Why: Stylelint 17.10 standardized logical property enforcement with three new rules (property-layout-mappings, unit-layout-mappings, value-keyword-layout-mappings). Mint's CSS audit needs a deterministic analyzer that detects physical directional properties and guides users toward flow-relative equivalents for automatic RTL/LTR and writing-mode support. The deterministic approach complements the existing LLM-based STEP 14 analysis (from card #10) by providing instant, syntax-level detection without LLM latency or cost.

Milestones

  • Milestone 1 -- Add LogicalPropertyIssue, LogicalPropertyAudit, and PHYSICAL_TO_LOGICAL mapping to lib/types.ts; add logicalProperties field to AuditReport
  • Milestone 2 -- Implement lintLogicalProperties() in lib/css-lint-rules.mjs: parse CSS, detect physical properties where flow-relative equivalents exist, emit issues with selectors and suggestions
  • Milestone 3 -- Wire logicalProperties into bin/mint-ds.mjs CLI output and audit-summary.mjs as a lint category with migration ratio display
  • Milestone 4 -- Add test fixture with mixed logical/physical CSS and tests referencing Stylelint 17.10 logical-properties rules

How to test:

npx vitest run lib/__tests__/css-lint-rules.test.mjs
# After milestone 3:
node bin/mint-ds.mjs lint <directory-with-physical-css>

@nujovich

nujovich commented Sep 3, 2026

Copy link
Copy Markdown
Owner Author

All milestones complete. Ready for review when you are.

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