Skip to content

svelte/svelte-check

Runs svelte-check over the scope for compiler and accessibility warnings, and the types of every component and TypeScript file.

Part of the svelte configuration, at the recommended level. It runs at the push stage, once per scope. It runs svelte-check.

tsc cannot parse a component file, and the Svelte compiler warns about markup that no browser reports.

Fix each warning and error svelte-check prints; both fail the check.

A component containing <img src={source} /> reports a11y_missing_attribute. Give the image a text alternative, such as <img src={source} alt={caption} />.

Turn it off for some files, with a reason:

gspot ignore svelte/svelte-check --paths "<glob>" --reason "<why>"