Official ESLint plugin for Svelte that leverages AST from svelte-eslint-parser. Current stable version is 3.17.1, with active release cadence (multiple minor/patch releases per month). Provides 80+ rules covering accessibility, best practices, style, and Svelte-specific patterns. Supports Svelte 3, 4, and 5. Requires ESLint v8.57.1+, v9+ or v10+. Ships TypeScript definitions. Recommended over deprecated eslint-plugin-svelte3. Integrates with flat config (eslint.config.js) and provides recommended configs.
npm install eslint-plugin-svelteVerified import paths — ran on the pinned version, not inferred.
Flat config using TypeScript-ESLint parser for Svelte files and recommending both TypeScript and Svelte rules.
Use `import svelte from 'eslint-plugin-svelte'` in eslint.config.js.
Uninstall eslint-plugin-svelte3 and install eslint-plugin-svelte. See migration guide.
Migrate to eslint.config.js with `import svelte from 'eslint-plugin-svelte'`.
Add `import svelteConfig from './svelte.config.js'` and set `parserOptions.svelteConfig`.
In eslint.config.js for `.svelte` files, add `languageOptions: { parserOptions: { parser: ts.parser } }`.Run `npm install --save-dev eslint-plugin-svelte` or ensure ESLint is run from the project root with correct node_modules.
Use 'svelte/valid-prop' or check rule list. Remove 'svelte/valid-compile' from config.
Ensure only one version is installed: `npm dedupe` or `npx eslint --ext .svelte --resolve-plugins-relative-to .`
Set parserOptions.svelteConfig in eslint.config.js: `parserOptions: { svelteConfig: './svelte.config.js' }`.Update svelte-eslint-parser and eslint-plugin-svelte to latest, and import svelte.config.js in eslint.config.js.