svelte-fast-check
raw JSON → 0.4.5 verified Fri May 01 auth: no javascript
svelte-fast-check is a fast type and Svelte compiler warning checker for Svelte/SvelteKit projects, leveraging the TypeScript 7 (tsgo) preview (Go-based, parallel) for up to 24x faster incremental checks compared to svelte-check. Version 0.4.5 (Jan 2025) adds Windows support and fixes Node.js glob compatibility. Requires Node.js 22+ or Bun, Svelte 5+, and TypeScript 5+. Key differentiators: uses tsgo for faster incremental type checking, supports Svelte compiler warnings (unused CSS, a11y), reads warningFilter from svelte.config.js. Not included: CSS language service diagnostics.
Common errors
error SyntaxError: Import named 'glob' not found in module 'fs/promises' ↓
cause Node.js 22/24 may not expose experimental `fs.glob` in some environments; used in v0.3.0-v0.4.3
fix
Update to svelte-fast-check v0.4.4+ or use Node.js 22 with
--experimental-modules flag. error Error: Cannot find module 'svelte-fast-check' ↓
cause Package not installed or running from wrong directory when using CLI symlinks
fix
Install as devDependency:
npm install -D svelte-fast-check. Ensure symlink paths are absolute (upgrade to v0.4.3+). error TypeError: svelte.config.js warningFilter is not a function ↓
cause warningFilter must be a function; may be misconfigured in svelte.config.js
fix
Ensure warningFilter is a function that returns a boolean. Example:
warningFilter: (warning) => warning.code !== 'css-unused-selector' error error TS2322: Type 'Snippet' is not assignable to type... ↓
cause False positive from tsgo for Snippet type; known issue tsgo#1682
fix
Upgrade to v0.2.1+ which filters this false positive. Or ignore with
// @ts-expect-error. Warnings
breaking Node.js version requirement changed from >=18 to >=22 in v0.3.0 ↓
fix Upgrade Node.js to 22+ or use Bun.
gotcha CLI scripts have `#!/usr/bin/env node` shebang; `bun svelte-fast-check` runs with Node.js by default ↓
fix Use `bun --bun svelte-fast-check` to force Bun runtime, or configure in package.json.
deprecated Node.js experimental `fs.glob` used in v0.3.0 was replaced in v0.4.4 due to `SyntaxError: Import named 'glob' not found in module 'fs/promises'` ↓
fix Upgrade to v0.4.4+ which uses `tinyglobby`.
gotcha Symbolic links to CLI may fail if relative paths are used; resolved in v0.4.3 ↓
fix Upgrade to v0.4.3+ or use absolute symlinks.
gotcha TypeScript 7 (tsgo) preview is experimental; not all TypeScript features may work ↓
fix Check tsgo issue tracker for known limitations. Pin tsgo version via package.json resolutions if needed.
gotcha CSS language service diagnostics are NOT included; only TypeScript errors and Svelte compiler warnings ↓
fix Use eslint-plugin-svelte or Biome for CSS diagnostics.
gotcha Svelte compiler warnings are filtered by default using `warningFilter` from svelte.config.js; can be disabled with `--no-svelte-warnings` ↓
fix To see all warnings, use `--no-svelte-warnings false` or remove warningFilter.
Install
npm install svelte-fast-check yarn add svelte-fast-check pnpm add svelte-fast-check Imports
- svelteFastCheck (default export from config) wrong
import { svelteFastCheck } from 'svelte-fast-check';correctimport svelteFastCheck from 'svelte-fast-check'; - FastCheckConfig wrong
import { FastCheckConfig } from 'svelte-fast-check';correctimport type { FastCheckConfig } from 'svelte-fast-check'; - run (if exposed) wrong
const run = require('svelte-fast-check');correctimport { run } from 'svelte-fast-check'; - MappedDiagnostic
import type { MappedDiagnostic } from 'svelte-fast-check';
Quickstart
# Install
npm install -D svelte-fast-check
# Basic usage
npx svelte-fast-check --incremental
# Or with Bun for faster runtime
bun add -D svelte-fast-check
bun --bun svelte-fast-check --incremental
# For a monorepo, specify tsconfig path:
npx svelte-fast-check --project packages/web/tsconfig.json