Skip to content

About

Fork of astro-eslint-parser with typescript-eslint projectService support

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

@entwico/astro-eslint-parser

A fork of astro-eslint-parser by Yosuke Ota, adding support for the typescript-eslint project service (parserOptions.projectService).

Usage

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).

Limitations

  • 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)

License

MIT

About

Fork of astro-eslint-parser with typescript-eslint projectService support

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages