Skip to content

astro/astro-check

Runs astro check over the scope: the type errors and warnings of every Astro component.

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

tsc cannot parse a component file, so a type error inside one ships unless astro check catches it.

Fix the first error astro check prints; later errors often come from the same mistake.

A component whose frontmatter holds const count: number = 'three'; reports ts(2322). Give the value the declared type, such as const count: number = 3;.

Turn it off for some files, or one of its lint rules, with a reason:

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