High-performance Svelte type-checker and linter
A high-performance, Rust-powered diagnostic engine designed as a drop-in replacement for svelte-check.
> Note: This tool only supports Svelte 5+. For Svelte 4 or earlier, use the official svelte-check.
- š Fast: 10-100x faster than svelte-check through Rust's zero-cost abstractions and parallel processing
- ā
Accurate: Matches svelte-check diagnostics, including Svelte compiler errors via bun
- š Compatible: Drop-in CLI replacement, identical output formats
- š§ Maintainable: Clean separation of concerns, comprehensive test suite
``bash`
npm install -D svelte-check-rs
The npm package uses platform-specific optional dependencies to provide the binary. If you install with --no-optional, re-enable optional dependencies or use the shell/PowerShell installers below.
Then add to your package.json scripts:
`json`
{
"scripts": {
"check": "svelte-check-rs"
}
}
Or run directly with npx:
`bash`
npx svelte-check-rs
`bash`
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/pheuter/svelte-check-rs/releases/latest/download/svelte-check-rs-installer.sh | sh
`powershell`
irm https://github.com/pheuter/svelte-check-rs/releases/latest/download/svelte-check-rs-installer.ps1 | iex
`bashCheck current directory
svelte-check-rs
Requirements
svelte-check-rs expects tsgo to be available from your workspace node_modules. Install it via:`bash
npm install -D @typescript/native-preview
`Some package managers (for example, bun) may auto-install peer dependencies, but explicit installation is always supported.
$3
| Option | Description |
|--------|-------------|
|
--workspace | Working directory (default: .) |
| --output | Output format: human, human-verbose, json, machine |
| --tsconfig | Path to tsconfig.json |
| --threshold | Minimum severity: error, warning |
| --watch | Watch mode |
| --preserveWatchOutput | Don't clear screen in watch mode |
| --fail-on-warnings | Exit with error on warnings |
| --ignore | Glob patterns to ignore |
| --no-cache | Disable per-project cache + incremental builds (fresh run) |
| --disable-sveltekit-cache | Disable cached .svelte-kit mirror |
| --skip-tsgo | Skip TypeScript type-checking |
| --tsgo-version | Show installed tsgo version + path |
| --bun-version | Show installed bun version + path |
| --bun-update[= | Update bun to latest or specific version |
| --debug-paths | Show resolved binaries (tsgo, bun, svelte-kit) |Caching: By default, svelte-check-rs writes transformed files and tsgo incremental build info to
node_modules/.cache/svelte-check-rs/. Use --no-cache for a fully fresh run (useful in CI).Project Structure
`
crates/
āāā svelte-parser/ # Lexer + parser + AST types
āāā source-map/ # Position tracking and mapping
āāā svelte-transformer/ # Svelte ā TypeScript transformation
āāā svelte-diagnostics/ # A11y and component checks
āāā tsgo-runner/ # tsgo process management
āāā bun-runner/ # bun-managed Svelte compiler bridge
āāā svelte-check-rs/ # CLI binary
`Development
`bash
Build all crates
cargo buildRun tests
cargo testRun clippy
cargo clippy --all-targets -- -D warningsFormat code
cargo fmt
``MIT License - see LICENSE for details.