Releases: ampcode/zvelte-check
Releases · ampcode/zvelte-check
v0.2.0
What's New
- Type narrowing in templates: Full support for discriminated unions,
{#if}/{:else if}chains, and{#each}blocks with proper type narrowing propagation - SvelteKit integration: Automatic
PageDatatype annotations for route files and generated types discovery - Snippet improvements: Proper narrowing context from
@rendercall sites,{@const}bindings inside snippet bodies, and optional parameter handling - Component prop validation: Check required props, type mismatches, and
bind:prop types - CSS vendor prefix diagnostics: Warn about compatibility issues with CSS vendor prefixes
- TypeScript file diagnostics: Report errors from all
.tsfiles in workspace, not just.sveltefiles state_referenced_locallywarning: Detect$state()variables referenced only in the defining scopeslot_element_deprecatedwarning: Warn about deprecated<slot>elements in Svelte 5 components
Bug Fixes
- Fix false positives for destructured
@constbindings and local types - Fix
state_referenced_locallyfalse positives for$bindableprops, object property keys, and$props()rest patterns - Fix import source mapping for files with leading comments or scattered imports
- Fix
typeoftype hoisting and layoutchildrenprop handling - Fix
style:directive parsing and skip custom action events - Fix tsconfig filtering with relative workspace paths
- Fix snippet narrowing for
{:else if}branches and enclosingifconditions - Emit
constfor{@const}bindings to enable closure narrowing - Preserve arrow function props for type checking
- Fix snippets in logic blocks not being treated as component props
- Respect
// svelte-ignorecomments forstate_referenced_locally - Fix callback parameter type inference
- Transform Svelte 4 store assignment syntax to
set()calls - Fix generic component props referencing out-of-scope type params
- Fix
{#each}binding scoping and destructuring with keyed expressions - Fix class directive parsing for Tailwind class names with dots/brackets
- Handle pipe modifiers on transition directives
- Fix brace matching in attribute expressions with comments
- Import
Snippettype globally for Svelte 5 compatibility - Fix discriminated union narrowing in template
if/else-ifchains - Detect unsupported TypeScript
enumandnamespacefeatures
Installation
brew install ampcode/tap/zvelte-checkv0.1.4
What's New
- Improved TypeScript compatibility: Use Svelte 5
Componentinterface forComponentPropsand add index signature to$$Exportsformount()compatibility - Integration test runner: New test infrastructure comparing zvelte-check output against svelte-check for parity verification
Bug Fixes
- Fix false positives for variables used in templates
- Fix expression attribute value extraction and handle shadowed builtins
- Emit
voidfor keyed{#each}key expressions - Add
skipPropsTypeAnnotationfor complex multi-line prop types - Mark store variables as used when
$prefixform appears in template - Filter unused import declaration errors for Svelte files
- Suppress
'Right operand of ?? is unreachable'for Svelte files - Emit
voidstatements for$bindable()props - Filter type-only import 'declared but never used' errors
- Filter
'unknown'type cascade errors in Svelte files - Fix brace counting in template scanner to skip string literals
- Add fallback for unmapped TypeScript regions in source maps
- Emit null-safe fallback for
{#each}iterables - Filter test file false positives from component type inference
- Filter false positive errors from template narrowing
- Skip reserved keywords in template refs
- Report errors from
.tsfiles alongside.sveltefiles - Emit template variable references to support
noUnusedLocals - Inherit strict type checks from project tsconfig
- Suppress type assertion conversion false positives
- Skip
'unknown'type property errors from tsgo rootDirs bug - Skip generic type params in
$bindable<T>()calls - Include SvelteKit generated types for route resolution
- Use Svelte 5
Componenttype for.svelteand~icons/*modules - Skip snippet declarations that shadow script imports
- Generate
vardeclarations for store subscriptions - Fix multi-line
$props()destructuring in Svelte 5 components - Fix store assignments and snippet param shadowing errors
- Fix TypeScript error detection in Svelte files
Installation
brew install ampcode/tap/zvelte-checkv0.1.3
What's New
- Fixed false positive:
separatorrole no longer incorrectly requiresaria-valuenow
Bug Fixes
- a11y-role-has-required-aria-props: The
separatorrole has no required ARIA properties per ARIA spec. Thearia-valuenowattribute is only optionally supported for focusable separators. This aligns with svelte-check behavior.
Installation
brew install ampcode/tap/zvelte-checkv0.1.2
What's New
- a11y: Merge consecutive svelte-ignore comments for cleaner diagnostics
- perf: Add early-exit checks and pre-size buffers in transformer
- tsgo: Cache line tables in diagnostic mapping for faster lookups
- tsgo: Resolve native binary directly, skip Node.js wrapper
Bug Fixes
None
Breaking Changes
None
v0.1.1
What's New
- Generated stubs now written to
.zvelte-check/directory instead of alongside source files, avoiding conflicts with parallel linters like Biome
Upgrade Notes
Add .zvelte-check/ to your project's .gitignore:
echo '.zvelte-check/' >> .gitignoreInstallation
brew install ampcode/tap/zvelte-checkv0.1.0
Release v0.1.0