Skip to content

Releases: ampcode/zvelte-check

v0.2.0

27 Jan 20:10
eae2197

Choose a tag to compare

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 PageData type annotations for route files and generated types discovery
  • Snippet improvements: Proper narrowing context from @render call 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 .ts files in workspace, not just .svelte files
  • state_referenced_locally warning: Detect $state() variables referenced only in the defining scope
  • slot_element_deprecated warning: Warn about deprecated <slot> elements in Svelte 5 components

Bug Fixes

  • Fix false positives for destructured @const bindings and local types
  • Fix state_referenced_locally false positives for $bindable props, object property keys, and $props() rest patterns
  • Fix import source mapping for files with leading comments or scattered imports
  • Fix typeof type hoisting and layout children prop 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 enclosing if conditions
  • Emit const for {@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-ignore comments for state_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 Snippet type globally for Svelte 5 compatibility
  • Fix discriminated union narrowing in template if/else-if chains
  • Detect unsupported TypeScript enum and namespace features

Installation

brew install ampcode/tap/zvelte-check

v0.1.4

11 Jan 23:16
6cf72fa

Choose a tag to compare

What's New

  • Improved TypeScript compatibility: Use Svelte 5 Component interface for ComponentProps and add index signature to $$Exports for mount() 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 void for keyed {#each} key expressions
  • Add skipPropsTypeAnnotation for complex multi-line prop types
  • Mark store variables as used when $prefix form appears in template
  • Filter unused import declaration errors for Svelte files
  • Suppress 'Right operand of ?? is unreachable' for Svelte files
  • Emit void statements 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 .ts files alongside .svelte files
  • 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 Component type for .svelte and ~icons/* modules
  • Skip snippet declarations that shadow script imports
  • Generate var declarations 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-check

v0.1.3

10 Jan 03:24
2ba08a8

Choose a tag to compare

What's New

  • Fixed false positive: separator role no longer incorrectly requires aria-valuenow

Bug Fixes

  • a11y-role-has-required-aria-props: The separator role has no required ARIA properties per ARIA spec. The aria-valuenow attribute is only optionally supported for focusable separators. This aligns with svelte-check behavior.

Installation

brew install ampcode/tap/zvelte-check

v0.1.2

10 Jan 03:09
ec7cc5c

Choose a tag to compare

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

10 Jan 00:25
fca031f

Choose a tag to compare

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/' >> .gitignore

Installation

brew install ampcode/tap/zvelte-check

v0.1.0

09 Jan 23:06
v0.1.0
b084adc

Choose a tag to compare

Release v0.1.0