A fork of astro-eslint-parser by Yosuke Ota, adding support for the typescript-eslint project service (parserOptions.projectService).
Same as the original parser, with the project service enabled:
// eslint.config.js
import astroEslintParser from "@entwico/astro-eslint-parser";
import tsParser from "@typescript-eslint/parser";
export default [
{
files: ["**/*.astro"],
languageOptions: {
parser: astroEslintParser,
parserOptions: {
parser: tsParser,
projectService: true,
},
},
},
];Your project's tsconfig.json must include the .astro files (e.g. "include": ["**/*"], which Astro's default tsconfigs already do).
- Component default imports (
import Card from './Card.astro') remain untyped, exactly as in upstream - The implementation patches tsserver internals at runtime (similar to the upstream parser too)