Skip to content

1 Architecture

Bosaj edited this page Nov 1, 2026 · 2 revisions

Architecture

src/css.ts        PostCSS rules for CSS and SCSS
src/tailwind.ts   physical → logical class map, with the skip rules
src/jsx.ts        Babel AST: classes, inline styles, icons, mixed text
src/html.ts       <html dir/lang>, <style> blocks
src/audit.ts      file walking and writing fixes
src/check.ts      LTR/RTL mirror comparison in a real browser
src/bidi.ts       isolate() and friends
src/react.tsx     provider and components
src/cli.ts        the rtl-audit command

Principles

  • A false alarm costs more than a missed bug. Each rule has tests for what it must not report.
  • --fix rewrites only exact equivalents. A computed left is never rewritten, because it is often a coordinate.
  • The runtime check decides on box geometry, because text never matches pixel for pixel.

Clone this wiki locally