{"name":"eslint-plugin-svelte","version":"3.2.2","keywords":["eslint","eslint-plugin","eslintplugin","svelte","sveltejs"],"author":{"url":"https://github.com/ota-meshi","name":"Yosuke Ota"},"license":"MIT","_id":"eslint-plugin-svelte@3.2.2","maintainers":[{"name":"jounqin","email":"admin@1stg.me"},{"name":"conduitry","email":"npm@chor.date"},{"name":"ota-meshi","email":"otameshiyo23@gmail.com"},{"name":"svelte-admin","email":"richard.a.harris+svelte@gmail.com"},{"name":"baseballyama","email":"xydybaseball@gmail.com"}],"homepage":"https://sveltejs.github.io/eslint-plugin-svelte","bugs":{"url":"https://github.com/sveltejs/eslint-plugin-svelte/issues"},"dist":{"shasum":"8456b71c5ce4fcf6008d9fb58c33fc48c4e8d9da","tarball":"http://registry-npm.ywwl.com/eslint-plugin-svelte/download/eslint-plugin-svelte-3.2.2.tgz","fileCount":253,"integrity":"sha512-6mzmAPOLsb4tXvjjZfM6RDhJnV6+QayGyiZ9SSwC3E4H8+f1bnQNvTEmAnmibdbyCfjVn5zKiav5V+XrompuQQ==","signatures":[{"sig":"MEUCICMlsQfXZPuoSgiRrzNZQUjo9GDknBu8N4oUmmn3LNqzAiEA+X3bcn4zMF67rVNhpMozJ5QhLZ2E8MxXGoq4i5PMHBs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":756755,"size":139559,"noattachment":false,"key":"/eslint-plugin-svelte/-/eslint-plugin-svelte-3.2.2.tgz"},"main":"lib/index.js","type":"module","_from":"file:eslint-plugin-svelte-3.2.2.tgz","types":"./lib/index.d.ts","engines":{"node":"^18.18.0 || ^20.9.0 || >=21.1.0"},"funding":"https://github.com/sponsors/ota-meshi","scripts":{"ts":"node --import tsx/esm","new":"pnpm run ts ./tools/new-rule.ts","lint":"run-p lint:*","test":"pnpm run mocha \"tests/src/**/*.ts\" --reporter dot --timeout 60000","build":"pnpm run build:meta && pnpm run build:ts","clean":"rimraf lib coverage build .svelte-kit svelte.config-dist.js","cover":"c8 --reporter=lcov pnpm run test","debug":"pnpm run mocha \"tests/src/**/*.ts\" --reporter dot --timeout 60000","mocha":"pnpm run ts ./node_modules/mocha/bin/mocha.js","update":"pnpm run ts ./tools/update.ts","lint:es":"eslint --cache .","release":"changeset publish","typecov":"type-coverage","version":"env-cmd -e version pnpm run update","build:ts":"tsc --project ./tsconfig.build.json","lint-fix":"pnpm run lint:es --fix","prebuild":"pnpm run clean","build:meta":"pnpm run ts ./tools/update-meta.ts","prerelease":"pnpm run clean && pnpm run build","test:debug":"env-cmd -e debug pnpm run test","version:ci":"env-cmd -e version-ci pnpm run update && changeset version","test:update-fixtures":"env-cmd -e update-fixtures pnpm run test"},"_npmUser":{"name":"ota-meshi","email":"otameshiyo23@gmail.com"},"_resolved":"/tmp/5261864d8a9f6e81dee37764bbd223e3/eslint-plugin-svelte-3.2.2.tgz","_integrity":"sha512-6mzmAPOLsb4tXvjjZfM6RDhJnV6+QayGyiZ9SSwC3E4H8+f1bnQNvTEmAnmibdbyCfjVn5zKiav5V+XrompuQQ==","repository":{"url":"git+https://github.com/sveltejs/eslint-plugin-svelte.git","type":"git"},"_npmVersion":"10.8.2","description":"ESLint plugin for Svelte using AST","directories":{},"_nodeVersion":"20.18.3","dependencies":{"semver":"^7.6.3","esutils":"^2.0.3","postcss":"^8.4.49","eslint-compat-utils":"^0.6.4","postcss-load-config":"^3.1.4","postcss-safe-parser":"^7.0.0","known-css-properties":"^0.35.0","svelte-eslint-parser":"^1.0.1","@jridgewell/sourcemap-codec":"^1.5.0","@eslint-community/eslint-utils":"^4.4.1"},"typeCoverage":{"cache":true,"detail":true,"strict":true,"update":true,"atLeast":98.9,"ignoreNested":true,"showRelativePath":true,"ignoreAsAssertion":true,"ignoreNonNullAssertion":true},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","less":"^4.2.1","sass":"^1.81.0","yaml":"^2.6.1","acorn":"^8.14.0","mocha":"^11.0.0","assert":"^2.1.0","espree":"^10.3.0","stylus":"^0.64.0","svelte":"^5.2.9","esbuild":"^0.25.0","@babel/core":"^7.26.0","@types/less":"^3.0.7","@types/node":"^22.10.0","svelte-i18n":"^4.0.1","@types/mocha":"^10.0.10","eslint-scope":"^8.2.0","@types/semver":"^7.5.8","@types/stylus":"^0.48.43","source-map-js":"^1.2.1","type-coverage":"^2.29.7","@types/esutils":"^2.0.2","eslint-typegen":"^2.0.0","postcss-nested":"^7.0.2","@types/babel__core":"^7.20.5","@types/json-schema":"^7.0.15","@types/eslint-utils":"^3.0.5","eslint-visitor-keys":"^4.2.0","@babel/eslint-parser":"^7.25.9","postcss-selector-parser":"^7.0.0","@types/postcss-safe-parser":"^5.0.4","@babel/plugin-proposal-function-bind":"^7.25.9","@eslint-community/eslint-plugin-eslint-comments":"^4.4.1"},"peerDependencies":{"eslint":"^8.57.1 || ^9.0.0","svelte":"^3.37.0 || ^4.0.0 || ^5.0.0"},"peerDependenciesMeta":{"svelte":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/eslint-plugin-svelte_3.2.2_1742220450959_0.2521875700544294","host":"s3://npm-registry-packages-npm-production"},"readme":"<!--DOCS_IGNORE_START-->\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&colorB=green&suffix=/day&query=$.downloads&uri=https://api.npmjs.org//downloads/point/last-day/eslint-plugin-svelte&maxAge=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&prefix=%E2%89%A5&suffix=%&query=$.typeCoverage.atLeast&uri=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<div align=\"center\">\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</div>\n\n<!--DOCS_IGNORE_END-->\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> [!NOTE]\n>\n> `eslint-plugin-svelte` and `svelte-eslint-parser` cannot be used alongside [eslint-plugin-svelte3](https://github.com/sveltejs/eslint-plugin-svelte3).\n\n<!--USAGE_SECTION_START-->\n<!--USAGE_GUIDE_START-->\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> [!NOTE]\n>\n> **Requirements:**\n>\n> - ESLint v8.57.1, v9.0.0, and above\n> - 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      parserOptions: {\n        // Keep this consistent for TypeScript and Svelte files to avoid project reloads.\n        extraFileExtensions: ['.svelte']\n      },\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        // 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> [!WARNING]\n> The TypeScript parser uses a singleton internally, meaning it only respects the options provided during its initial initialization.\n> 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> For more context, see [typescript-eslint/typescript-eslint#6778](https://github.com/typescript-eslint/typescript-eslint/issues/6778).\n\n#### Svelte config inside `vite.config.js`\n\nThe Svelte config can also be passed to the `sveltekit()` or `svelte()` plugin in `vite.config.js`; SvelteKit 3 projects do this by default. Use [`@sveltejs/load-config`](https://www.npmjs.com/package/@sveltejs/load-config) to load it:\n\n```js\n// eslint.config.js\nimport { loadConfig } from '@sveltejs/load-config';\n\nconst svelteConfig = (await loadConfig('./', { traverse: false }))?.config;\n```\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\nSvelteKit versions are detected from the installed `@sveltejs/kit` package, falling back to its dependency range in `package.json`. The plugin recognizes SvelteKit 1, 2, and 3, including SvelteKit 3 prereleases. Version-specific rules run only for the versions they support.\n\nFor SvelteKit 3 projects using a custom routes directory, set `settings.svelte.kit.files.routes` to match the `files.routes` option passed to the `sveltekit` Vite plugin. SvelteKit 3 no longer uses `svelte.config.js`; see the [official migration guide](https://svelte.dev/docs/kit/migrating-to-sveltekit-3#Configuration).\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<!--USAGE_GUIDE_END-->\n<!--USAGE_SECTION_END-->\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<!--DOCS_IGNORE_END-->\n\n## Rules\n\n<!-- prettier-ignore-start -->\n<!--RULES_SECTION_START-->\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<!--RULES_TABLE_START-->\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-bind-value-on-checkable-inputs](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-bind-value-on-checkable-inputs/) | disallow useless `bind:value` on `<input type=\"checkbox\">` and `<input type=\"radio\">` | :bulb: |\n| [svelte/no-conflicting-module-names](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-conflicting-module-names/) | disallow a `.svelte` component and a same-named runes module (e.g. `Foo.svelte` and `Foo.svelte.ts`) from coexisting |  |\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-nested-style-tag](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-nested-style-tag/) | disallow `<style>` elements nested inside other elements or blocks |  |\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 `<script>` and `<style>` 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-const-tags](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-at-const-tags/) | disallow the use of `{@const}` in favor of `{const ...}` declaration tags | :wrench: |\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-derived-over-derived-by](https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-derived-over-derived-by/) | disallow unnecessary `$derived.by()` when `$derived()` is sufficient | :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 & 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-attribute-interpolation](https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-attribute-interpolation/) | require attribute interpolation instead of template literals |  |\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 `<!--` and before the `-->` 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| [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\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 invalid props in SvelteKit route 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 `<script>` 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>=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<!--RULES_TABLE_END-->\n<!--RULES_SECTION_END-->\n<!-- prettier-ignore-end -->\n\n<!--DOCS_IGNORE_START-->\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<!--DOCS_IGNORE_END-->\n\n## License\n\nSee [LICENSE](LICENSE) (MIT).\n","publish_time":1742220451299,"_cnpm_publish_time":1742220451299,"dist-tags":{"latest":"3.24.0","next":"3.0.0-next.18"}}