Astro
Use Astro support from the lean v3 composer. Install the @santi020k/eslint-config-astro package.
Install
Section titled “Install”pnpm add -D @santi020k/eslint-config-basic @santi020k/eslint-config-astro eslintnpm install -D @santi020k/eslint-config-basic @santi020k/eslint-config-astro eslintyarn add -D @santi020k/eslint-config-basic @santi020k/eslint-config-astro eslintbun add -d @santi020k/eslint-config-basic @santi020k/eslint-config-astro eslintConfigure
Section titled “Configure”import { defineConfig } from '@santi020k/eslint-config-basic'
export default await defineConfig({ frameworks: { astro: true }, typescript: true})With the required config packages installed, the one-line recommended entry auto-detects the framework; custom configs can use defineConfig() without a frameworks object.
What It Adds
Section titled “What It Adds”- Astro files and embedded script/template linting.
- TypeScript frontmatter, including
import type, works in both syntax-only and type-aware modes without a manual parser override. - Composition through the same
@santi020k/eslint-config-basicentry point as every other framework. - Compatibility with advanced overrides if you pass a custom config array or factory instead of
true.
Astro Doctor
Section titled “Astro Doctor”Enable the optional Astro Doctor ESLint rules for additional performance, accessibility, security, and best-practice diagnostics:
import { defineConfig } from '@santi020k/eslint-config-basic'
export default await defineConfig({ features: { 'astro-doctor': true }, frameworks: { astro: true }})This integration adds Astro Doctor’s proprietary rules and its recommended official Astro rules while reusing the framework config’s parser and plugin registration. Health scoring, project audits, baselines, and changed-file scanning remain available through the separate @santi020k/astro-doctor CLI.
- This framework package is a public, optional dependency in v3; the basic composer loads it only when enabled.
- Type-aware unnecessary-condition checks stay enabled for ordinary TypeScript,
but are disabled for
.astrofiles because generated props and frontmatter boundaries can make valid template fallbacks appear statically unnecessary. - For the archived v1 setup, see the v1 Astro guide.
Related Pages
Section titled “Related Pages”Did this page help?
Your answer stays in this browser. Share details on GitHub to help improve the docs.