Miraat — RTL / Arabic linter for VS Code
Live right-to-left correctness, in your editor. Miraat underlines the RTL mistakes AI code tools keep making — physical margin-left / ml-4, hard-coded dir="ltr", un-mirrored icons, script-blind fonts, Western digits in native-numeral scripts, missing bidi isolation — as you type, and offers one-click fixes. Works for every right-to-left script: Arabic, Hebrew, Syriac, Thaana, N'Ko, Adlam.
There is no other RTL language server. This is it.
What you get
- Live diagnostics on open / change / save, in JS/TS/JSX/TSX, CSS/SCSS/LESS, Vue, Svelte and HTML.
- Quick-fixes: a per-finding fix (
margin-left → margin-inline-start, ml-4 → ms-4, …) and a whole-file "Fix all safe RTL issues" (AST-safe — formatting is preserved to the byte).
- Same brain as the CLI. The extension runs the
miraat-lsp server from the miraat package, which reuses the exact AST engine as npx miraat — so your miraat.config.json per-rule severities and /* miraat-disable */ comments are honoured in the editor too.
Fix on save
Add the Miraat source action to your settings to auto-fix on save:
// .vscode/settings.json
{
"editor.codeActionsOnSave": { "source.fixAll.miraat": "explicit" }
}
Commands
- Miraat: Fix all safe RTL issues in this file (also the status-bar
⧉ RTL button)
- Miraat: Restart RTL language server
Settings
| Setting |
Default |
Description |
miraat.enable |
true |
Enable the language server. |
miraat.serverPath |
"" |
Absolute path to a custom miraat-lsp server (advanced). Empty = bundled. |
How it relates to the CLI
This editor extension is the ambient surface; the miraat CLI is the same engine for CI, pre-commit and the --fix codemod, plus the AI-agent rule injection (miraat --init-rules) and the MCP server. Use both: squiggles while you write, miraat --check to gate CI.
Build & publish (maintainer)
npm install
npm run package # → miraat-rtl-<version>.vsix (@vscode/vsce)
npm run publish # to the VS Code Marketplace (needs a publisher + PAT)
# Open VSX: npx ovsx publish *.vsix
MIT © 2026 OttoSpace