Menu
Libraries |
Category

svelte-eslint-parser

  • Purpose: A parser that enables ESLint to analyze and lint Svelte components, allowing developers to create custom ESLint rules for Svelte applications.
  • Target Audience: Developers working with Svelte who want to enforce code quality and consistency through ESLint rules.
  • Key Features:
    • Parses Svelte components into an AST (Abstract Syntax Tree) compatible with ESLint.
    • Supports TypeScript within Svelte <script> tags when configured with @typescript-eslint/parser.
    • Provides scope analysis for Svelte templates and scripts.
    • Configurable for Svelte 5 features like runes via parserOptions.svelteFeatures.
  • Svelte Support: Primarily designed for Svelte, with first-class support for .svelte files and Svelte-specific syntax.
  • Related Plugins:
  • Tooling Integration: Works with editors like VS Code via the ESLint extension, requiring configuration to include .svelte files.
  • Customization: Developers can extend functionality by writing custom ESLint rules using the provided AST structure (documented in AST.md ).

svelteeslinteslint-parserparsersveltejseslint-custom-parser

Comments