{"id":13801113,"url":"https://github.com/sveltejs/eslint-plugin-svelte","last_synced_at":"2026-04-01T21:25:56.135Z","repository":{"id":38231179,"uuid":"362455201","full_name":"sveltejs/eslint-plugin-svelte","owner":"sveltejs","description":"ESLint plugin for Svelte using AST","archived":false,"fork":false,"pushed_at":"2025-05-09T00:03:43.000Z","size":3044,"stargazers_count":335,"open_issues_count":70,"forks_count":48,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-05-11T21:43:30.193Z","etag":null,"topics":["eslint","eslint-plugin","svelte","sveltejs"],"latest_commit_sha":null,"homepage":"https://sveltejs.github.io/eslint-plugin-svelte/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sveltejs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"open_collective":"svelte","github":["ota-meshi","JounQin"],"patreon":"1stG","custom":["https://opencollective.com/rxts"]}},"created_at":"2021-04-28T12:13:31.000Z","updated_at":"2025-05-09T00:03:00.000Z","dependencies_parsed_at":"2024-03-21T08:26:47.207Z","dependency_job_id":"38dfc530-ecea-42be-9df7-4f756a2696a6","html_url":"https://github.com/sveltejs/eslint-plugin-svelte","commit_stats":{"total_commits":825,"total_committers":23,"mean_commits":"35.869565217391305","dds":0.4763636363636363,"last_synced_commit":"1f6a19333ad4066bf5a9b00c3c5cb9fd08608a05"},"previous_names":["ota-meshi/eslint-plugin-svelte"],"tags_count":191,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sveltejs%2Feslint-plugin-svelte","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sveltejs%2Feslint-plugin-svelte/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sveltejs%2Feslint-plugin-svelte/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sveltejs%2Feslint-plugin-svelte/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sveltejs","download_url":"https://codeload.github.com/sveltejs/eslint-plugin-svelte/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253851080,"owners_count":21973674,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["eslint","eslint-plugin","svelte","sveltejs"],"created_at":"2024-08-04T00:01:19.626Z","updated_at":"2026-04-01T21:25:56.121Z","avatar_url":"https://github.com/sveltejs.png","language":"TypeScript","funding_links":["https://opencollective.com/svelte","https://github.com/sponsors/ota-meshi","https://github.com/sponsors/JounQin","https://patreon.com/1stG","https://opencollective.com/rxts"],"categories":["Plugins","TypeScript","Dev Tools","Recently Updated"],"sub_categories":["Frameworks","Lint","[Oct 27, 2024](/content/2024/10/27/README.md)"],"readme":"\u003c!--DOCS_IGNORE_START--\u003e\n\n[![NPM license](https://img.shields.io/npm/l/eslint-plugin-svelte.svg)](https://www.npmjs.com/package/eslint-plugin-svelte)\n[![NPM version](https://img.shields.io/npm/v/eslint-plugin-svelte.svg)](https://www.npmjs.com/package/eslint-plugin-svelte)\n[![NPM downloads](https://img.shields.io/badge/dynamic/json.svg?label=downloads\u0026colorB=green\u0026suffix=/day\u0026query=$.downloads\u0026uri=https://api.npmjs.org//downloads/point/last-day/eslint-plugin-svelte\u0026maxAge=3600)](http://www.npmtrends.com/eslint-plugin-svelte)\n[![NPM downloads](https://img.shields.io/npm/dw/eslint-plugin-svelte.svg)](http://www.npmtrends.com/eslint-plugin-svelte)\n[![NPM downloads](https://img.shields.io/npm/dm/eslint-plugin-svelte.svg)](http://www.npmtrends.com/eslint-plugin-svelte)\n[![NPM downloads](https://img.shields.io/npm/dy/eslint-plugin-svelte.svg)](http://www.npmtrends.com/eslint-plugin-svelte)\n[![NPM downloads](https://img.shields.io/npm/dt/eslint-plugin-svelte.svg)](http://www.npmtrends.com/eslint-plugin-svelte)\n[![Build Status](https://github.com/sveltejs/eslint-plugin-svelte/workflows/CI/badge.svg?branch=main)](https://github.com/sveltejs/eslint-plugin-svelte/actions?query=workflow%3ACI)\n\n[![type-coverage](https://img.shields.io/badge/dynamic/json.svg?label=type-coverage\u0026prefix=%E2%89%A5\u0026suffix=%\u0026query=$.typeCoverage.atLeast\u0026uri=https%3A%2F%2Fraw.githubusercontent.com%2Fsveltejs%2Feslint-plugin-svelte%2Fmain%2Fpackage.json)](https://github.com/plantain-00/type-coverage)\n[![Conventional Commits](https://img.shields.io/badge/conventional%20commits-1.0.0-yellow.svg)](https://conventionalcommits.org)\n[![Code Style: Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n[![changesets](https://img.shields.io/badge/maintained%20with-changesets-176de3.svg)](https://github.com/atlassian/changesets)\n\n\u003cdiv align=\"center\"\u003e\n\n# eslint-plugin-svelte\n\n## ESLint plugin for Svelte using AST\n\n[Live Demo](https://eslint-online-playground.netlify.app/#eslint-plugin-svelte%20with%20typescript) •\n[Documentation](https://sveltejs.github.io/eslint-plugin-svelte/) •\n[Discord](https://svelte.dev/chat)\n\n\u003c/div\u003e\n\n\u003c!--DOCS_IGNORE_END--\u003e\n\n## Introduction\n\n`eslint-plugin-svelte` is the official [ESLint](https://eslint.org/) plugin for [Svelte](https://svelte.dev/).\\\nIt leverages the AST generated by [svelte-eslint-parser](https://github.com/sveltejs/svelte-eslint-parser) to provide custom linting for Svelte.\\\n\n\u003e [!NOTE]\n\u003e\n\u003e `eslint-plugin-svelte` and `svelte-eslint-parser` cannot be used alongside [eslint-plugin-svelte3](https://github.com/sveltejs/eslint-plugin-svelte3).\n\n\u003c!--USAGE_SECTION_START--\u003e\n\u003c!--USAGE_GUIDE_START--\u003e\n\n## Installation\n\n### CLI\n\nThe recommended way to get started is to use the CLI.\n\n```sh\n# new project\nnpx sv create\n\n# existing project\nnpx sv add eslint\n```\n\nSee the [CLI docs](https://svelte.dev/docs/cli/eslint) for more details.\n\n### Manual Setup\n\n```sh\nnpm install --save-dev svelte eslint eslint-plugin-svelte globals\n```\n\n\u003e [!NOTE]\n\u003e\n\u003e **Requirements:**\n\u003e\n\u003e - ESLint v8.57.1, v9.0.0, and above\n\u003e - Node.js v18.18.0, v20.9.0, v21.1.0 and above\n\n## Usage\n\nUse `eslint.config.js` to configure rules. See [ESLint documentation](https://eslint.org/docs/latest/use/configure/configuration-files-new) for more details.\n\n### Configuration\n\n#### JavaScript project\n\n```js\n// eslint.config.js\nimport svelteConfig from './svelte.config.js';\nimport { defineConfig } from 'eslint/config';\nimport globals from 'globals';\nimport js from '@eslint/js';\nimport svelte from 'eslint-plugin-svelte';\n\nexport default defineConfig([\n  // ...\n  js.configs.recommended,\n  svelte.configs.recommended,\n  {\n    languageOptions: {\n      globals: {\n        ...globals.browser,\n        // for Sveltekit in non-SPA mode\n        ...globals.node\n      }\n    }\n  },\n  {\n    files: ['**/*.svelte', '**/*.svelte.js'],\n    languageOptions: {\n      parserOptions: {\n        // explicitly importing allows for better compatibilty and functionality with rules and other tooling that depend on the config file.\n        //\n        // Note: `eslint --cache` will fail with non-serializable properties.\n        // In those cases, please remove the non-serializable properties.\n        // svelteConfig: {\n        //   ...svelteConfig,\n        //   kit: {\n        //     ...svelteConfig.kit,\n        //     typescript: undefined\n        //   }\n        // }\n        svelteConfig\n      }\n    }\n  },\n  {\n    rules: {\n      // Override or add rule settings here, such as:\n      // 'svelte/rule-name': 'error'\n    }\n  }\n]);\n```\n\n#### TypeScript project\n\n```shell\nnpm install --save-dev typescript-eslint\n```\n\n```js\n// eslint.config.js\nimport svelteConfig from './svelte.config.js';\nimport { defineConfig } from 'eslint/config';\nimport globals from 'globals';\nimport js from '@eslint/js';\nimport ts from 'typescript-eslint';\nimport svelte from 'eslint-plugin-svelte';\n\nexport default defineConfig(\n  js.configs.recommended,\n  ts.configs.recommended,\n  svelte.configs.recommended,\n  {\n    languageOptions: {\n      globals: {\n        ...globals.browser,\n        // for Sveltekit in non-SPA mode\n        ...globals.node\n      }\n    }\n    // ...\n  },\n  {\n    files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],\n    // See more details at: https://typescript-eslint.io/packages/parser/\n    languageOptions: {\n      parserOptions: {\n        projectService: true,\n        // Enable typescript parsing for `.svelte` files.\n        extraFileExtensions: ['.svelte'],\n\n        // Specify a parser for each language, if needed:\n        // parser: {\n        //   ts: ts.parser,\n        //   typescript: ts.parser\n        //   js: espree,            // add `import espree from 'espree'`\n        // },\n        parser: ts.parser,\n\n        // explicitly importing allows for better compatibilty and functionality with rules and other tooling that depend on the config file.\n        //\n        // Note: `eslint --cache` will fail with non-serializable properties.\n        // In those cases, please remove the non-serializable properties.\n        // svelteConfig: {\n        //   ...svelteConfig,\n        //   kit: {\n        //     ...svelteConfig.kit,\n        //     typescript: undefined\n        //   }\n        // }\n        svelteConfig\n      }\n    }\n  },\n  {\n    rules: {\n      // Override or add rule settings here, such as:\n      // 'svelte/rule-name': 'error'\n    }\n  }\n);\n```\n\n\u003e [!WARNING]\n\u003e The TypeScript parser uses a singleton internally, meaning it only respects the options provided during its initial initialization.\n\u003e If you try to change the options for a different file or override them later, the parser will ignore the new options, which may lead to errors.\n\u003e For more context, see [typescript-eslint/typescript-eslint#6778](https://github.com/typescript-eslint/typescript-eslint/issues/6778).\n\n### Available Configurations\n\nThis plugin provides the following configurations:\n\n- **`svelte.configs.base`** - **Required** for Svelte parsing. Does not include any rules. Ideal for building a custom configurations.\n- **`svelte.configs.recommended`** - Extends `base` and includes rules for best practices.\n- **`svelte.configs.prettier`** - Extends `base` and disables rules that may conflict with [Prettier](https://prettier.io/). Prettier still needs to be configured to work with Svelte, for example, by using [prettier-plugin-svelte](https://github.com/sveltejs/prettier-plugin-svelte).\n- **`svelte.configs.all`** - **Not Recommended** - Extends `base` and includes all rules. Subject to change with every major and minor release. Use at your own risk.\n\nFor more details, see [the rule list](https://sveltejs.github.io/eslint-plugin-svelte/rules/) to explore the rules provided by this plugin.\n\n### settings.svelte\n\nYou can customize the behavior of this plugin using specific settings.\n\n```js\n// eslint.config.js\nexport default defineConfig([\n  // ...\n  {\n    settings: {\n      svelte: {\n        // Specifies an array of rules to ignore reports within the template.\n        // For example, use this to disable rules in the template that may produce unavoidable false positives.\n        ignoreWarnings: [\n          '@typescript-eslint/no-unsafe-assignment',\n          '@typescript-eslint/no-unsafe-member-access'\n        ],\n\n        // Specifies options for Svelte compilation.\n        // This affects rules that rely on Svelte compilation,\n        // such as `svelte/valid-compile` and `svelte/no-unused-svelte-ignore`.\n        // Note that this setting does not impact ESLint’s custom parser.\n        compileOptions: {\n          // Specifies options related to PostCSS. You can disable the PostCSS processing by setting it to false.\n          postcss: {\n            // Specifies the path to the directory that contains the PostCSS configuration.\n            configFilePath: './path/to/my/postcss.config.js'\n          }\n        },\n\n        // Even if settings.svelte.kit is not specified, the rules will attempt to load information from svelte.config.js.\n        // However, if the default behavior does not work as expected, you should specify settings.svelte.kit explicitly.\n        // If you are using SvelteKit with a non-default configuration, you need to set the following options.\n        // The schema is a subset of SvelteKit’s configuration, so refer to the SvelteKit documentation for more details.\n        // https://svelte.dev/docs/kit/configuration\n        kit: {\n          files: {\n            routes: 'src/routes'\n          }\n        }\n      }\n    }\n  }\n  // ...\n]);\n```\n\n## Editor Integrations\n\n**Visual Studio Code**\\\nInstall [dbaeumer.vscode-eslint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint).\\\nConfigure `.svelte` files in `.vscode/settings.json`:\n\n\u003c!--USAGE_GUIDE_END--\u003e\n\u003c!--USAGE_SECTION_END--\u003e\n\n## Migration Guide\n\nIf you’re migrating from `eslint-plugin-svelte@1` or [`@ota-meshi/eslint-plugin-svelte`](https://www.npmjs.com/package/@ota-meshi/eslint-plugin-svelte), see the [migration guide](https://sveltejs.github.io/eslint-plugin-svelte/migration/).\n\n## Versioning Policy\n\nThis project follows [Semantic Versioning](https://semver.org/). Unlike [ESLint’s versioning policy](https://github.com/eslint/eslint#semantic-versioning-policy), new rules may be added to the recommended config in minor releases. If these rules cause unwanted warnings, you can disable them.\n\n\u003c!--DOCS_IGNORE_END--\u003e\n\n## Rules\n\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!--RULES_SECTION_START--\u003e\n\n:wrench: Indicates that the rule is fixable, and using `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) can automatically fix some of the reported problems.\\\n:bulb: Indicates that some problems reported by the rule are manually fixable by editor [suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).\\\n:star: Indicates that the rule is included in the `plugin:svelte/recommended` config.\n\n\u003c!--RULES_TABLE_START--\u003e\n\n## Possible Errors\n\nThese rules relate to possible syntax or logic errors in Svelte code:\n\n| Rule ID | Description |    |\n|:--------|:------------|:---|\n| [svelte/infinite-reactive-loop](https://sveltejs.github.io/eslint-plugin-svelte/rules/infinite-reactive-loop/) | Svelte runtime prevents calling the same reactive statement twice in a microtask. But between different microtask, it doesn't prevent. | :star: |\n| [svelte/no-dom-manipulating](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-dom-manipulating/) | disallow DOM manipulating | :star: |\n| [svelte/no-dupe-else-if-blocks](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-dupe-else-if-blocks/) | disallow duplicate conditions in `{#if}` / `{:else if}` chains | :star: |\n| [svelte/no-dupe-on-directives](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-dupe-on-directives/) | disallow duplicate `on:` directives | :star: |\n| [svelte/no-dupe-style-properties](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-dupe-style-properties/) | disallow duplicate style properties | :star: |\n| [svelte/no-dupe-use-directives](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-dupe-use-directives/) | disallow duplicate `use:` directives | :star: |\n| [svelte/no-not-function-handler](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-not-function-handler/) | disallow use of not function in event handler | :star: |\n| [svelte/no-object-in-text-mustaches](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-object-in-text-mustaches/) | disallow objects in text mustache interpolation | :star: |\n| [svelte/no-raw-special-elements](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-raw-special-elements/) | Checks for invalid raw HTML elements | :star::wrench: |\n| [svelte/no-reactive-reassign](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-reactive-reassign/) | disallow reassigning reactive values | :star: |\n| [svelte/no-shorthand-style-property-overrides](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-shorthand-style-property-overrides/) | disallow shorthand style properties that override related longhand properties | :star: |\n| [svelte/no-store-async](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-store-async/) | disallow using async/await inside svelte stores because it causes issues with the auto-unsubscribing features | :star: |\n| [svelte/no-top-level-browser-globals](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-top-level-browser-globals/) | disallow using top-level browser global variables |  |\n| [svelte/no-unknown-style-directive-property](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-unknown-style-directive-property/) | disallow unknown `style:property` | :star: |\n| [svelte/prefer-svelte-reactivity](https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-svelte-reactivity/) | disallow using mutable instances of built-in classes where a reactive alternative is provided by svelte/reactivity | :star: |\n| [svelte/require-store-callbacks-use-set-param](https://sveltejs.github.io/eslint-plugin-svelte/rules/require-store-callbacks-use-set-param/) | store callbacks must use `set` param | :bulb: |\n| [svelte/require-store-reactive-access](https://sveltejs.github.io/eslint-plugin-svelte/rules/require-store-reactive-access/) | disallow to use of the store itself as an operand. Need to use $ prefix or get function. | :star::wrench: |\n| [svelte/valid-compile](https://sveltejs.github.io/eslint-plugin-svelte/rules/valid-compile/) | disallow warnings when compiling. |  |\n| [svelte/valid-style-parse](https://sveltejs.github.io/eslint-plugin-svelte/rules/valid-style-parse/) | require valid style element parsing |  |\n\n## Security Vulnerability\n\nThese rules relate to security vulnerabilities in Svelte code:\n\n| Rule ID | Description |    |\n|:--------|:------------|:---|\n| [svelte/no-at-html-tags](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-at-html-tags/) | disallow use of `{@html}` to prevent XSS attack | :star: |\n| [svelte/no-target-blank](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-target-blank/) | disallow `target=\"_blank\"` attribute without `rel=\"noopener noreferrer\"` |  |\n\n## Best Practices\n\nThese rules relate to better ways of doing things to help you avoid problems:\n\n| Rule ID | Description |    |\n|:--------|:------------|:---|\n| [svelte/block-lang](https://sveltejs.github.io/eslint-plugin-svelte/rules/block-lang/) | disallows the use of languages other than those specified in the configuration for the lang attribute of `\u003cscript\u003e` and `\u003cstyle\u003e` blocks. | :bulb: |\n| [svelte/button-has-type](https://sveltejs.github.io/eslint-plugin-svelte/rules/button-has-type/) | disallow usage of button without an explicit type attribute |  |\n| [svelte/no-add-event-listener](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-add-event-listener/) | Warns against the use of `addEventListener` | :bulb: |\n| [svelte/no-at-debug-tags](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-at-debug-tags/) | disallow the use of `{@debug}` | :star::bulb: |\n| [svelte/no-ignored-unsubscribe](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-ignored-unsubscribe/) | disallow ignoring the unsubscribe method returned by the `subscribe()` on Svelte stores. |  |\n| [svelte/no-immutable-reactive-statements](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-immutable-reactive-statements/) | disallow reactive statements that don't reference reactive values. | :star: |\n| [svelte/no-inline-styles](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-inline-styles/) | disallow attributes and directives that produce inline styles |  |\n| [svelte/no-inspect](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-inspect/) | Warns against the use of `$inspect` directive | :star: |\n| [svelte/no-reactive-functions](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-reactive-functions/) | it's not necessary to define functions in reactive statements | :star::bulb: |\n| [svelte/no-reactive-literals](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-reactive-literals/) | don't assign literal values in reactive statements | :star::bulb: |\n| [svelte/no-svelte-internal](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-svelte-internal/) | svelte/internal will be removed in Svelte 6. | :star: |\n| [svelte/no-unnecessary-state-wrap](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-unnecessary-state-wrap/) | Disallow unnecessary $state wrapping of reactive classes | :star::bulb: |\n| [svelte/no-unused-class-name](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-unused-class-name/) | disallow the use of a class in the template without a corresponding style |  |\n| [svelte/no-unused-props](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-unused-props/) | Warns about defined Props properties that are unused | :star: |\n| [svelte/no-unused-svelte-ignore](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-unused-svelte-ignore/) | disallow unused svelte-ignore comments | :star: |\n| [svelte/no-useless-children-snippet](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-useless-children-snippet/) | disallow explicit children snippet where it's not needed | :star: |\n| [svelte/no-useless-mustaches](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-useless-mustaches/) | disallow unnecessary mustache interpolations | :star::wrench: |\n| [svelte/prefer-const](https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-const/) | Require `const` declarations for variables that are never reassigned after declared | :wrench: |\n| [svelte/prefer-destructured-store-props](https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-destructured-store-props/) | destructure values from object stores for better change tracking \u0026 fewer redraws | :bulb: |\n| [svelte/prefer-writable-derived](https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-writable-derived/) | Prefer using writable $derived instead of $state and $effect | :star::bulb: |\n| [svelte/require-each-key](https://sveltejs.github.io/eslint-plugin-svelte/rules/require-each-key/) | require keyed `{#each}` block | :star: |\n| [svelte/require-event-dispatcher-types](https://sveltejs.github.io/eslint-plugin-svelte/rules/require-event-dispatcher-types/) | require type parameters for `createEventDispatcher` | :star: |\n| [svelte/require-optimized-style-attribute](https://sveltejs.github.io/eslint-plugin-svelte/rules/require-optimized-style-attribute/) | require style attributes that can be optimized |  |\n| [svelte/require-stores-init](https://sveltejs.github.io/eslint-plugin-svelte/rules/require-stores-init/) | require initial value in store |  |\n| [svelte/valid-each-key](https://sveltejs.github.io/eslint-plugin-svelte/rules/valid-each-key/) | enforce keys to use variables defined in the `{#each}` block | :star: |\n\n## Stylistic Issues\n\nThese rules relate to style guidelines, and are therefore quite subjective:\n\n| Rule ID | Description |    |\n|:--------|:------------|:---|\n| [svelte/consistent-selector-style](https://sveltejs.github.io/eslint-plugin-svelte/rules/consistent-selector-style/) | enforce a consistent style for CSS selectors |  |\n| [svelte/derived-has-same-inputs-outputs](https://sveltejs.github.io/eslint-plugin-svelte/rules/derived-has-same-inputs-outputs/) | derived store should use same variable names between values and callback | :bulb: |\n| [svelte/first-attribute-linebreak](https://sveltejs.github.io/eslint-plugin-svelte/rules/first-attribute-linebreak/) | enforce the location of first attribute | :wrench: |\n| [svelte/html-closing-bracket-new-line](https://sveltejs.github.io/eslint-plugin-svelte/rules/html-closing-bracket-new-line/) | Require or disallow a line break before tag's closing brackets | :wrench: |\n| [svelte/html-closing-bracket-spacing](https://sveltejs.github.io/eslint-plugin-svelte/rules/html-closing-bracket-spacing/) | require or disallow a space before tag's closing brackets | :wrench: |\n| [svelte/html-quotes](https://sveltejs.github.io/eslint-plugin-svelte/rules/html-quotes/) | enforce quotes style of HTML attributes | :wrench: |\n| [svelte/html-self-closing](https://sveltejs.github.io/eslint-plugin-svelte/rules/html-self-closing/) | enforce self-closing style | :wrench: |\n| [svelte/indent](https://sveltejs.github.io/eslint-plugin-svelte/rules/indent/) | enforce consistent indentation | :wrench: |\n| [svelte/max-attributes-per-line](https://sveltejs.github.io/eslint-plugin-svelte/rules/max-attributes-per-line/) | enforce the maximum number of attributes per line | :wrench: |\n| [svelte/max-lines-per-block](https://sveltejs.github.io/eslint-plugin-svelte/rules/max-lines-per-block/) | enforce maximum number of lines in svelte component blocks |  |\n| [svelte/mustache-spacing](https://sveltejs.github.io/eslint-plugin-svelte/rules/mustache-spacing/) | enforce unified spacing in mustache | :wrench: |\n| [svelte/no-extra-reactive-curlies](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-extra-reactive-curlies/) | disallow wrapping single reactive statements in curly braces | :bulb: |\n| [svelte/no-restricted-html-elements](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-restricted-html-elements/) | disallow specific HTML elements |  |\n| [svelte/no-spaces-around-equal-signs-in-attribute](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-spaces-around-equal-signs-in-attribute/) | disallow spaces around equal signs in attribute | :wrench: |\n| [svelte/prefer-class-directive](https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-class-directive/) | require class directives instead of ternary expressions | :wrench: |\n| [svelte/prefer-style-directive](https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-style-directive/) | require style directives instead of style attribute | :wrench: |\n| [svelte/require-event-prefix](https://sveltejs.github.io/eslint-plugin-svelte/rules/require-event-prefix/) | require component event names to start with \"on\" |  |\n| [svelte/shorthand-attribute](https://sveltejs.github.io/eslint-plugin-svelte/rules/shorthand-attribute/) | enforce use of shorthand syntax in attribute | :wrench: |\n| [svelte/shorthand-directive](https://sveltejs.github.io/eslint-plugin-svelte/rules/shorthand-directive/) | enforce use of shorthand syntax in directives | :wrench: |\n| [svelte/sort-attributes](https://sveltejs.github.io/eslint-plugin-svelte/rules/sort-attributes/) | enforce order of attributes | :wrench: |\n| [svelte/spaced-html-comment](https://sveltejs.github.io/eslint-plugin-svelte/rules/spaced-html-comment/) | enforce consistent spacing after the `\u003c!--` and before the `--\u003e` in a HTML comment | :wrench: |\n\n## Extension Rules\n\nThese rules extend the rules provided by ESLint itself, or other plugins to work well in Svelte:\n\n| Rule ID | Description |    |\n|:--------|:------------|:---|\n| [svelte/no-inner-declarations](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-inner-declarations/) | disallow variable or `function` declarations in nested blocks | :star: |\n| [svelte/no-trailing-spaces](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-trailing-spaces/) | disallow trailing whitespace at the end of lines | :wrench: |\n\n## SvelteKit\n\nThese rules relate to SvelteKit and its best Practices.\n\n| Rule ID | Description |    |\n|:--------|:------------|:---|\n| [svelte/no-export-load-in-svelte-module-in-kit-pages](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-export-load-in-svelte-module-in-kit-pages/) | disallow exporting load functions in `*.svelte` module in SvelteKit page components. | :star: |\n| [svelte/no-navigation-without-resolve](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-navigation-without-resolve/) | disallow internal navigation (links, `goto()`, `pushState()`, `replaceState()`) without a `resolve()` | :star: |\n| [svelte/valid-prop-names-in-kit-pages](https://sveltejs.github.io/eslint-plugin-svelte/rules/valid-prop-names-in-kit-pages/) | disallow props other than data or errors in SvelteKit page components. | :star: |\n\n## Experimental\n\n:warning: These rules are considered experimental and may change or be removed in the future:\n\n| Rule ID | Description |    |\n|:--------|:------------|:---|\n| [svelte/experimental-require-slot-types](https://sveltejs.github.io/eslint-plugin-svelte/rules/experimental-require-slot-types/) | require slot type declaration using the `$$Slots` interface |  |\n| [svelte/experimental-require-strict-events](https://sveltejs.github.io/eslint-plugin-svelte/rules/experimental-require-strict-events/) | require the strictEvents attribute on `\u003cscript\u003e` tags |  |\n\n## System\n\nThese rules relate to this plugin works:\n\n| Rule ID | Description |    |\n|:--------|:------------|:---|\n| [svelte/comment-directive](https://sveltejs.github.io/eslint-plugin-svelte/rules/comment-directive/) | support comment-directives in HTML template | :star: |\n| [svelte/system](https://sveltejs.github.io/eslint-plugin-svelte/rules/system/) | system rule for working this plugin | :star: |\n\n## Deprecated\n\n- :warning: We're going to remove deprecated rules in the next major release. Please migrate to successor/new rules.\n- :innocent: We don't fix bugs which are in deprecated rules since we don't have enough resources.\n\n| Rule ID | Replaced by |\n|:--------|:------------|\n| [svelte/@typescript-eslint/no-unnecessary-condition](https://sveltejs.github.io/eslint-plugin-svelte/rules/@typescript-eslint/no-unnecessary-condition/) | This rule is no longer needed when using svelte-eslint-parser\u003e=v0.19.0. |\n| [svelte/no-dynamic-slot-name](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-dynamic-slot-name/) | Now Svelte compiler itself throws an compile error. |\n| [svelte/no-goto-without-base](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-goto-without-base/) | [svelte/no-navigation-without-resolve](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-navigation-without-resolve/) |\n| [svelte/no-navigation-without-base](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-navigation-without-base/) | [svelte/no-navigation-without-resolve](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-navigation-without-resolve/) |\n\n\u003c!--RULES_TABLE_END--\u003e\n\u003c!--RULES_SECTION_END--\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!--DOCS_IGNORE_START--\u003e\n\n## Contributing\n\nContributions are welcome! Please open an issue or submit a PR. For more details, see [CONTRIBUTING.md](./CONTRIBUTING.md).\\\nRefer to [svelte-eslint-parser](https://github.com/sveltejs/svelte-eslint-parser) for AST details.\n\n\u003c!--DOCS_IGNORE_END--\u003e\n\n## License\n\nSee [LICENSE](LICENSE) (MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsveltejs%2Feslint-plugin-svelte","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsveltejs%2Feslint-plugin-svelte","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsveltejs%2Feslint-plugin-svelte/lists"}