Astro
The astro configuration lints Astro components with eslint-plugin-astro and its accessibility rules, and type-checks
them with astro check. Prettier formats .astro files.
| Check | Stage | Level | What it does |
|---|---|---|---|
astro/astro-check |
push |
basic |
Runs astro check over the scope: the type errors and warnings of every Astro component. |
When the project also uses @astrojs/sitemap or Starlight, gspot turns on site, which builds the site and checks the
pages, as Static sites describes.
Type check
Section titled “Type check”Before each push, astro/astro-check runs astro check, which covers the .astro files that tsc cannot read, and fails
on a warning as it does on an error. When the scope uses typescript, typescript/tsc still checks your .ts files.
ESLint rules
Section titled “ESLint rules”javascript/eslint checks each component, and the scripts inside it, with the flat/recommended and
flat/jsx-a11y-recommended presets of eslint-plugin-astro. It also reports set:html, exports from a component, and a
prerender export outside a page. Level all adds rules for unused CSS selectors and for how to write class:list.
The <script> blocks of a component run in the browser, so in them gspot/no-client-environment allows only the
environment variables that start with PUBLIC_, and NODE_ENV, SITE, and ASSETS_PREFIX.
At level all, gspot reports files that only forward to another module, but an Astro component never counts as one, even
when its script only imports a module.