lint_rtl_code
Check CSS, HTML, JSX, or TSX for layout breaks in right-to-left languages. Identifies physical properties, directional utilities, and dir issues, and provides logical replacements.
Instructions
Check a snippet of CSS, HTML, JSX or TSX for layout that breaks in right-to-left languages: physical CSS properties, directional Tailwind utilities, and dir problems. Returns each finding with the logical replacement. Use this before handing RTL-facing markup back to the user.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | The source to check. | |
| baseDir | No | The base direction of the document. Pass "rtl" when the app root is <html dir="rtl">: in an Arabic-first app "right" is the start side, so the logical replacement is the opposite one. Default "ltr". | |
| filename | Yes | A filename such as Button.tsx or theme.css. Only the extension matters — it selects which rules run. |