-
-
diff --git a/docs-svelte-kit/src/lib/eslint/MonacoEditor.svelte b/docs-svelte-kit/src/lib/eslint/MonacoEditor.svelte
deleted file mode 100644
index 34b3ae02b..000000000
--- a/docs-svelte-kit/src/lib/eslint/MonacoEditor.svelte
+++ /dev/null
@@ -1,278 +0,0 @@
-
-
-
-
-{#await loading}
- {#if started}
-
- {/if}
-{:then}
-
-{/await}
-
-
diff --git a/docs-svelte-kit/src/lib/eslint/scripts/linter.js b/docs-svelte-kit/src/lib/eslint/scripts/linter.js
deleted file mode 100644
index 6f8d92013..000000000
--- a/docs-svelte-kit/src/lib/eslint/scripts/linter.js
+++ /dev/null
@@ -1,151 +0,0 @@
-import { rules as pluginRules } from '../../../../../packages/eslint-plugin-svelte/src/utils/rules.ts';
-import { builtinRules } from 'eslint/use-at-your-own-risk';
-import * as svelteEslintParser from 'svelte-eslint-parser';
-
-export {
- preprocess,
- postprocess
-} from '../../../../../packages/eslint-plugin-svelte/src/processor/index.ts';
-
-export const categories = [
- {
- title: 'Possible Errors',
- classes: 'svelte-category',
- rules: []
- },
- {
- title: 'Security Vulnerability',
- classes: 'svelte-category',
- rules: []
- },
- {
- title: 'Best Practices',
- classes: 'svelte-category',
- rules: []
- },
- {
- title: 'Stylistic Issues',
- classes: 'svelte-category',
- rules: []
- },
- {
- title: 'Extension Rules',
- classes: 'svelte-category',
- rules: []
- },
- {
- title: 'SvelteKit',
- classes: 'svelte-category',
- rules: []
- },
- {
- title: 'Experimental',
- classes: 'svelte-category',
- rules: []
- },
- {
- title: 'System',
- classes: 'svelte-category',
- rules: []
- },
- {
- type: 'problem',
- title: 'Possible Errors (CORE)',
- classes: 'core-category',
- rules: []
- },
- {
- type: 'suggestion',
- title: 'Suggestions (CORE)',
- classes: 'core-category',
- rules: []
- },
- {
- type: 'layout',
- title: 'Layout & Formatting (CORE)',
- classes: 'core-category',
- rules: []
- }
-];
-export const DEFAULT_RULES_CONFIG = {};
-
-const rules = [];
-for (const rule of pluginRules) {
- if (rule.meta.deprecated) {
- continue;
- }
- const data = {
- ruleId: rule.meta.docs.ruleId,
- rule,
- classes: 'svelte-rule',
- url: rule.meta.docs.url
- };
- rules.push(data);
- const category = rule.meta.docs.category;
- categories.find((c) => c.title === category).rules.push(data);
-
- if (
- rule.meta.docs.ruleId !== 'svelte/no-export-load-in-svelte-module-in-kit-pages' &&
- rule.meta.docs.ruleId !== 'svelte/valid-prop-names-in-kit-pages' &&
- rule.meta.docs.ruleId !== 'svelte/no-restricted-html-elements'
- ) {
- DEFAULT_RULES_CONFIG[rule.meta.docs.ruleId] = 'error';
- }
-}
-
-for (const [ruleId, rule] of builtinRules) {
- if (rule.meta.deprecated) {
- continue;
- }
- const data = {
- ruleId,
- rule,
- classes: 'core-rule',
- url: rule.meta.docs.url
- };
- rules.push(data);
- const type = rule.meta.type;
- categories.find((c) => c.type === type).rules.push(data);
-
- if (rule.meta.docs.recommended && ruleId !== 'no-inner-declarations') {
- DEFAULT_RULES_CONFIG[ruleId] = 'error';
- }
-}
-
-/** Get rule data */
-export function getRule(ruleId) {
- for (const cat of categories) {
- for (const rule of cat.rules) {
- if (rule.ruleId === ruleId) {
- return rule;
- }
- }
- }
- return '';
-}
-
-/**
- * @returns {import('eslint').Linter.Config[]}
- */
-export function createLinterConfig() {
- return [
- {
- files: ['**'],
- plugins: {
- svelte: {
- rules: Object.fromEntries(pluginRules.map((rule) => [rule.meta.docs.ruleName, rule]))
- }
- }
- },
- {
- files: ['**/*.svelte', '*.svelte'],
- languageOptions: {
- parser: svelteEslintParser
- }
- }
- ];
-}
-
-export function rulesMap() {
- return new Map([...builtinRules, ...pluginRules.map((rule) => [rule.meta.docs.ruleId, rule])]);
-}
diff --git a/docs-svelte-kit/src/lib/eslint/scripts/monaco-loader.js b/docs-svelte-kit/src/lib/eslint/scripts/monaco-loader.js
deleted file mode 100644
index cd1e85ed3..000000000
--- a/docs-svelte-kit/src/lib/eslint/scripts/monaco-loader.js
+++ /dev/null
@@ -1,66 +0,0 @@
-import { language } from './syntax.js';
-
-async function setupMonaco() {
- if (typeof window !== 'undefined') {
- const monacoScript =
- Array.from(document.head.querySelectorAll('script')).find(
- (script) => script.src && script.src.includes('monaco') && script.src.includes('vs/loader')
- ) || (await appendMonacoEditorScript());
- window.require.config({
- paths: {
- vs: monacoScript.src.replace(/\/vs\/.*$/u, '/vs')
- }
- });
- }
-}
-
-function appendMonacoEditorScript() {
- return new Promise((resolve) => {
- const script = document.createElement('script');
- script.src = 'https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.34.0/min/vs/loader.min.js';
- script.onload = () => {
- script.onload = null;
-
- watch();
-
- function watch() {
- if (window.require) {
- resolve(script);
- return;
- }
- setTimeout(watch, 200);
- }
- };
- document.head.append(script);
- });
-}
-
-let setupedMonaco = null;
-let editorLoaded = null;
-
-export function loadMonacoEngine() {
- return setupedMonaco || (setupedMonaco = setupMonaco());
-}
-export function loadMonacoEditor() {
- if (editorLoaded) {
- return editorLoaded;
- }
- return (editorLoaded = (async () => {
- const monaco = await loadModuleFromMonaco('vs/editor/editor.main');
-
- monaco.languages.register({ id: 'svelte' });
- monaco.languages.setMonarchTokensProvider('svelte', language);
- return monaco;
- })());
-}
-
-export async function loadModuleFromMonaco(moduleName) {
- await loadMonacoEngine();
- return new Promise((resolve) => {
- if (typeof window !== 'undefined') {
- window.require([moduleName], (r) => {
- resolve(r);
- });
- }
- });
-}
diff --git a/docs-svelte-kit/src/lib/eslint/scripts/syntax.js b/docs-svelte-kit/src/lib/eslint/scripts/syntax.js
deleted file mode 100644
index cc23d2f39..000000000
--- a/docs-svelte-kit/src/lib/eslint/scripts/syntax.js
+++ /dev/null
@@ -1,294 +0,0 @@
-export const language = {
- defaultToken: '',
- tokenPostfix: '.html',
- ignoreCase: true,
-
- // The main tokenizer for our languages
- tokenizer: {
- root: [
- [/)/, ['delimiter', 'tag', '', 'delimiter']],
- [/(<)(script)/, ['delimiter', { token: 'tag', next: '@script' }]],
- [/(<)(style)/, ['delimiter', { token: 'tag', next: '@style' }]],
- [/(<)((?:[\w-]+:)?[\w-]+)/, ['delimiter', { token: 'tag', next: '@otherTag' }]],
- [/(<\/)((?:[\w-]+:)?[\w-]+)/, ['delimiter', { token: 'tag', next: '@otherTag' }]],
- [/, 'delimiter'],
- [/[^<{]+/] // text
- ],
-
- svelteMustache: [
- [/[\t\n\r ]+/], // whitespace
- [/(:)(else if)/, ['delimiter.svelte', 'keyword.flow']],
- [/([#/:@])([^\s}]+)/, ['delimiter.svelte', 'keyword.flow']],
- [/\}/, 'delimiter', '@pop'],
- [/\{/, 'delimiter.bracket', '@svelteMustacheInBrackets'],
- [
- /[^{}]/,
- {
- token: '@rematch',
- next: '@svelteScriptEmbedded',
- nextEmbedded: 'text/javascript'
- }
- ]
- ],
- svelteMustacheInBrackets: [
- [/\}/, 'delimiter.bracket', '@pop'],
- [/\{/, 'delimiter.bracket', '@push'],
- [
- /[^{}]/,
- {
- token: '@rematch',
- next: '@svelteScriptEmbedded',
- nextEmbedded: 'text/javascript'
- }
- ]
- ],
- svelteScriptEmbedded: [
- [
- /[{}]/,
- {
- token: '@rematch',
- next: '@pop',
- nextEmbedded: '@pop'
- }
- ],
- [/[^{}]+/]
- ],
-
- doctype: [
- [/[^>]+/, 'metatag.content'],
- [/>/, 'metatag', '@pop']
- ],
-
- comment: [
- [/-->/, 'comment', '@pop'],
- [/[^-]+/, 'comment.content'],
- [/./, 'comment.content']
- ],
-
- otherTag: [
- [/\/?>/, 'delimiter', '@pop'],
- [
- /([=])(["'])/,
- [
- 'delimiter',
- {
- token: 'attribute.value',
- next: '@attributeValue.$2'
- }
- ]
- ],
- [
- /([=])(\s+)(["'])/,
- [
- 'delimiter',
- '',
- {
- token: 'attribute.value',
- next: '@attributeValue.$3'
- }
- ]
- ],
- [/[=]\s*\{/, 'delimiter', '@svelteMustache'],
- [/"([^"]*)"/, 'attribute.value'],
- [/'([^']*)'/, 'attribute.value'],
- [/(\w+)(:)([\w-]+)/, ['keyword.flow', 'delimiter.svelte', 'attribute.name']],
- [/[\w-]+/, 'attribute.name'],
- [/[=]/, 'delimiter'],
- [/[\t\n\r ]+/] // whitespace
- ],
-
- attributeValue: [
- [
- /[\s\S]/,
- {
- cases: {
- '$0==$S2': { token: 'attribute.value', next: '@pop' },
- '$0=={': { token: 'delimiter', next: '@svelteMustache' },
- '@default': { token: 'attribute.value' }
- }
- }
- ]
- ],
-
- // -- BEGIN `;
- state.tokens.unshift(newToken);
- }
-
- /** Extract imported components */
- function* extractInjectedComponents(tokens: Token[]): Iterable {
- for (const token of tokens) {
- if (
- (token.type === 'html_inline' || token.type === 'html_block') &&
- token.content.trim().startsWith('
```
-
-
-
-
```svelte
@@ -41,10 +35,6 @@ This rule enforces all svelte components to use the same set of languages for th
```
-
-
-
-
```svelte
@@ -54,8 +44,6 @@ This rule enforces all svelte components to use the same set of languages for th
```
-
-
## :wrench: Options
```json
diff --git a/docs/rules/button-has-type.md b/docs/rules/button-has-type.md
index 4b5d938db..22a8e95f6 100644
--- a/docs/rules/button-has-type.md
+++ b/docs/rules/button-has-type.md
@@ -14,8 +14,6 @@ since: 'v0.0.4'
This rule aims to warn if no type or an invalid type is used on a button type attribute.
-
-
```svelte
@@ -34,8 +32,6 @@ This rule aims to warn if no type or an invalid type is used on a button type at
```
-
-
## :wrench: Options
```json
diff --git a/docs/rules/comment-directive.md b/docs/rules/comment-directive.md
index 8eb035522..be08902a2 100644
--- a/docs/rules/comment-directive.md
+++ b/docs/rules/comment-directive.md
@@ -30,8 +30,6 @@ ESLint doesn't provide any API to enhance `eslint-disable` functionality and ESL
This rule sends all `eslint-disable`-like comments to the post-process of the `.svelte` file processor, then the post-process removes the reported errors in disabled areas.
-
-
```svelte
@@ -43,12 +41,8 @@ This rule sends all `eslint-disable`-like comments to the post-process of the `.
```
-
-
The `eslint-disable`-like comments can include descriptions to explain why the comment is necessary. The description must occur after the directive and is separated from the directive by two or more consecutive `-` characters. For example:
-
-
```svelte
@@ -60,8 +54,6 @@ The `eslint-disable`-like comments can include descriptions to explain why the c
```
-
-
## :wrench: Options
```json
@@ -79,8 +71,6 @@ The `eslint-disable`-like comments can include descriptions to explain why the c
### `{ "reportUnusedDisableDirectives": true }`
-
-
```svelte
@@ -98,8 +88,6 @@ The `eslint-disable`-like comments can include descriptions to explain why the c
```
-
-
## :books: Further Reading
- [Disabling rules with inline comments]
diff --git a/docs/rules/derived-has-same-inputs-outputs.md b/docs/rules/derived-has-same-inputs-outputs.md
index 8d9d1ba9d..b059bc655 100644
--- a/docs/rules/derived-has-same-inputs-outputs.md
+++ b/docs/rules/derived-has-same-inputs-outputs.md
@@ -15,8 +15,6 @@ since: 'v2.8.0'
This rule reports where variable names and callback function's argument names are different.
This is mainly a recommended rule to avoid implementation confusion.
-
-
```js
@@ -35,8 +33,6 @@ derived(a, (b, set) => {});
derived([a, b], ([one, two]) => {});
```
-
-
## :wrench: Options
Nothing.
diff --git a/docs/rules/experimental-require-slot-types.md b/docs/rules/experimental-require-slot-types.md
index f7397009e..b3a21ee48 100644
--- a/docs/rules/experimental-require-slot-types.md
+++ b/docs/rules/experimental-require-slot-types.md
@@ -15,8 +15,6 @@ since: 'v2.18.0'
This rule enforces the presence of the `$$Slots` interface if any slots are present in the component. This interface declares all of the used slots and their props and enables typechecking both in the component itself as well as all components that include it.
The `$$Slots` interface is experimental and is documented in [svelte RFC #38](https://github.com/dummdidumm/rfcs/blob/ts-typedefs-within-svelte-components/text/ts-typing-props-slots-events.md#typing-slots).
-
-
```svelte
@@ -28,10 +26,6 @@ The `$$Slots` interface is experimental and is documented in [svelte RFC #38](ht
No slots here!
```
-
-
-
-
```svelte
@@ -47,10 +41,6 @@ The `$$Slots` interface is experimental and is documented in [svelte RFC #38](ht
```
-
-
-
-
```svelte
@@ -66,10 +56,6 @@ The `$$Slots` interface is experimental and is documented in [svelte RFC #38](ht
```
-
-
-
-
```svelte
@@ -85,10 +71,6 @@ The `$$Slots` interface is experimental and is documented in [svelte RFC #38](ht
```
-
-
-
-
```svelte
@@ -100,8 +82,6 @@ The `$$Slots` interface is experimental and is documented in [svelte RFC #38](ht
```
-
-
## :wrench: Options
Nothing.
diff --git a/docs/rules/experimental-require-strict-events.md b/docs/rules/experimental-require-strict-events.md
index 2e4d80bc2..a635f4de1 100644
--- a/docs/rules/experimental-require-strict-events.md
+++ b/docs/rules/experimental-require-strict-events.md
@@ -14,8 +14,6 @@ since: 'v2.18.0'
This rule enforces the presence of the `strictEvents` attribute on the main `
```
-
-
-
-
```svelte
@@ -39,10 +33,6 @@ This rule enforces the presence of the `strictEvents` attribute on the main `
```
-
-
-
-
```svelte
@@ -52,8 +42,6 @@ This rule enforces the presence of the `strictEvents` attribute on the main `
```
-
-
## :wrench: Options
Nothing.
diff --git a/docs/rules/first-attribute-linebreak.md b/docs/rules/first-attribute-linebreak.md
index 830477d6e..b79ed9869 100644
--- a/docs/rules/first-attribute-linebreak.md
+++ b/docs/rules/first-attribute-linebreak.md
@@ -16,8 +16,6 @@ since: 'v0.6.0'
This rule aims to enforce a consistent location for the first attribute.
-
-
@@ -45,8 +43,6 @@ This rule aims to enforce a consistent location for the first attribute.
-
-
## :wrench: Options
```json
diff --git a/docs/rules/html-closing-bracket-new-line.md b/docs/rules/html-closing-bracket-new-line.md
index ec91a84a1..80a2e6fb8 100644
--- a/docs/rules/html-closing-bracket-new-line.md
+++ b/docs/rules/html-closing-bracket-new-line.md
@@ -16,8 +16,6 @@ since: 'v2.45.0'
This rule enforces a line break (or no line break) before tag's closing brackets, which can also be configured to be enforced on self-closing tags.
-
-
@@ -56,8 +54,6 @@ This rule enforces a line break (or no line break) before tag's closing brackets
-
-
## :wrench: Options
```json
diff --git a/docs/rules/html-closing-bracket-spacing.md b/docs/rules/html-closing-bracket-spacing.md
index a23ebfdbf..6b4c2dcbe 100644
--- a/docs/rules/html-closing-bracket-spacing.md
+++ b/docs/rules/html-closing-bracket-spacing.md
@@ -19,8 +19,6 @@ You can choose either two styles for spacing before closing bracket
- always: ``
- never: ``
-
-
@@ -45,8 +43,6 @@ You can choose either two styles for spacing before closing bracket
-
-
## :wrench: Options
```json
diff --git a/docs/rules/html-quotes.md b/docs/rules/html-quotes.md
index c95c31ca2..04cc8249a 100644
--- a/docs/rules/html-quotes.md
+++ b/docs/rules/html-quotes.md
@@ -22,8 +22,6 @@ You can choose quotes of HTML attributes from:
This rule enforces the quotes style of HTML attributes.
-
-
@@ -43,8 +41,6 @@ This rule enforces the quotes style of HTML attributes.
-
-
## :wrench: Options
```json
diff --git a/docs/rules/html-self-closing.md b/docs/rules/html-self-closing.md
index 5f9cc366e..18c131b68 100644
--- a/docs/rules/html-self-closing.md
+++ b/docs/rules/html-self-closing.md
@@ -19,8 +19,6 @@ You can choose either two styles for elements without content
- always: ``
- never: ``
-
-
@@ -46,8 +44,6 @@ You can choose either two styles for elements without content
-
-
## :wrench: Options
presets:
diff --git a/docs/rules/indent.md b/docs/rules/indent.md
index c5e9144a4..592bef427 100644
--- a/docs/rules/indent.md
+++ b/docs/rules/indent.md
@@ -19,8 +19,6 @@ This rule enforces a consistent indentation style in `.svelte`. The default styl
- This rule checks all tags, also all expressions in directives and mustaches.
- In the expressions, this rule supports ECMAScript 2021 syntaxes and some TypeScript syntaxes. It ignores unknown AST nodes, but it might be confused by non-standard syntaxes.
-
-
@@ -51,8 +49,6 @@ CLICK ME!
-
-
::: warning Note
This rule only checks `.svelte` files and does not interfere with other `.js` files. Unfortunately the default `indent` rule when turned on will try to lint both, so in order to make them complementary you can use `overrides` setting and disable `indent` rule on `.svelte` files:
:::
diff --git a/docs/rules/infinite-reactive-loop.md b/docs/rules/infinite-reactive-loop.md
index 9d7d71fa0..30da359fb 100644
--- a/docs/rules/infinite-reactive-loop.md
+++ b/docs/rules/infinite-reactive-loop.md
@@ -16,8 +16,6 @@ Svelte runtime prevents calling the same reactive statement twice in a microtask
But between different microtask, it doesn't prevent.
This rule reports those possible infinite loop.
-
-
```svelte
@@ -82,8 +80,6 @@ This rule reports those possible infinite loop.
```
-
-
## :wrench: Options
Nothing.
diff --git a/docs/rules/max-attributes-per-line.md b/docs/rules/max-attributes-per-line.md
index 045679937..e3dc9960c 100644
--- a/docs/rules/max-attributes-per-line.md
+++ b/docs/rules/max-attributes-per-line.md
@@ -22,8 +22,6 @@ An attribute is considered to be in a new line when there is a line break betwee
There is a configurable number of attributes that are acceptable in one-line case (default 1), as well as how many attributes are acceptable per line in multi-line case (default 1).
-
-
@@ -55,8 +53,6 @@ There is a configurable number of attributes that are acceptable in one-line cas
```
-
-
## :wrench: Options
diff --git a/docs/rules/mustache-spacing.md b/docs/rules/mustache-spacing.md
index be77624ff..f1e3e4bc4 100644
--- a/docs/rules/mustache-spacing.md
+++ b/docs/rules/mustache-spacing.md
@@ -16,8 +16,6 @@ since: 'v0.15.0'
This rule aims at enforcing unified spacing in mustaches.
-
-
@@ -57,8 +55,6 @@ This rule aims at enforcing unified spacing in mustaches.
{ #key id }...{ /key }
```
-
-
## :wrench: Options
diff --git a/docs/rules/no-at-debug-tags.md b/docs/rules/no-at-debug-tags.md
index 114a46c37..5167bef81 100644
--- a/docs/rules/no-at-debug-tags.md
+++ b/docs/rules/no-at-debug-tags.md
@@ -18,8 +18,6 @@ This rule reports all uses of `{@debug}`.
The `{@debug}` should be removed when you no longer need it after you use it for debugging.
-
-
```svelte
@@ -33,8 +31,6 @@ The `{@debug}` should be removed when you no longer need it after you use it for
{@debug}
```
-
-
## :wrench: Options
Nothing.
diff --git a/docs/rules/no-at-html-tags.md b/docs/rules/no-at-html-tags.md
index f2169cf1f..bdec6d96a 100644
--- a/docs/rules/no-at-html-tags.md
+++ b/docs/rules/no-at-html-tags.md
@@ -16,8 +16,6 @@ since: 'v0.0.1'
This rule reports all uses of `{@html}` in order to reduce the risk of injecting potentially unsafe / unescaped html into the browser leading to Cross-Site Scripting (XSS) attacks.
-
-
```svelte
@@ -32,8 +30,6 @@ This rule reports all uses of `{@html}` in order to reduce the risk of injecting
{@html foo}
```
-
-
## :wrench: Options
Nothing.
diff --git a/docs/rules/no-deprecated-raw-special-elements.md b/docs/rules/no-deprecated-raw-special-elements.md
index 4bf863ae6..d7c6adf67 100644
--- a/docs/rules/no-deprecated-raw-special-elements.md
+++ b/docs/rules/no-deprecated-raw-special-elements.md
@@ -16,8 +16,6 @@ description: 'Recommends not using raw special elements in Svelte versions previ
This rule reports the usage of `head`, `body`, `window`, `document`, `element` and `options` HTML elements. These elements were valid in in versions proior to 5, but since Svelte 5 they must be used with `svelte:`.
-
-
```svelte
@@ -36,8 +34,6 @@ This rule reports the usage of `head`, `body`, `window`, `document`, `element` a
```
-
-
## :wrench: Options
Nothing.
diff --git a/docs/rules/no-dom-manipulating.md b/docs/rules/no-dom-manipulating.md
index b4c4182bf..8a0ddec8e 100644
--- a/docs/rules/no-dom-manipulating.md
+++ b/docs/rules/no-dom-manipulating.md
@@ -16,8 +16,6 @@ In general, DOM manipulating should delegate to Svelte runtime. If you manipulat
Therefore this rule reports where you use DOM manipulating function.
We don't recommend but If you intentionally manipulate the DOM, simply you can ignore this ESLint report.
-
-
```svelte
@@ -47,12 +45,8 @@ We don't recommend but If you intentionally manipulate the DOM, simply you can i
```
-
-
This rule only tracks and checks variables given with `bind:this={}`. In other words, it doesn't track things like function arguments given to `transition:` directives. These functions have been well tested and are often used more carefully.
-
-
```svelte
@@ -90,8 +84,6 @@ This rule only tracks and checks variables given with `bind:this={}`. In other w
{/if}
```
-
-
See also .
## :wrench: Options
diff --git a/docs/rules/no-dupe-else-if-blocks.md b/docs/rules/no-dupe-else-if-blocks.md
index 1a63a7f5d..839e1720d 100644
--- a/docs/rules/no-dupe-else-if-blocks.md
+++ b/docs/rules/no-dupe-else-if-blocks.md
@@ -16,8 +16,6 @@ since: 'v0.0.1'
This rule disallows duplicate conditions in the same `{#if}` / `{:else if}` chain.
-
-
```svelte
@@ -55,12 +53,8 @@ This rule disallows duplicate conditions in the same `{#if}` / `{:else if}` chai
{/if}
```
-
-
This rule can also detect some cases where the conditions are not identical, but the branch can never execute due to the logic of `||` and `&&` operators.
-
-
```svelte
@@ -110,8 +104,6 @@ This rule can also detect some cases where the conditions are not identical, but
{/if}
```
-
-
## :wrench: Options
Nothing.
diff --git a/docs/rules/no-dupe-on-directives.md b/docs/rules/no-dupe-on-directives.md
index 12fc78373..12823fc0e 100644
--- a/docs/rules/no-dupe-on-directives.md
+++ b/docs/rules/no-dupe-on-directives.md
@@ -15,8 +15,6 @@ since: 'v2.14.0'
We can define any number of `on:` directive with the same event name, but duplicate directives with the exact same event name and expression are probably a mistake.
This rule reports reports `on:` directives with exactly the same event name and expression.
-
-
```svelte
@@ -40,8 +38,6 @@ This rule reports reports `on:` directives with exactly the same event name and
/>
```
-
-
## :wrench: Options
Nothing.
diff --git a/docs/rules/no-dupe-style-properties.md b/docs/rules/no-dupe-style-properties.md
index 366f91b54..b618092c6 100644
--- a/docs/rules/no-dupe-style-properties.md
+++ b/docs/rules/no-dupe-style-properties.md
@@ -16,8 +16,6 @@ since: 'v0.31.0'
This rule reports duplicate style properties.
-
-
```svelte
@@ -35,8 +33,6 @@ This rule reports duplicate style properties.
...
```
-
-
## :wrench: Options
Nothing.
diff --git a/docs/rules/no-dupe-use-directives.md b/docs/rules/no-dupe-use-directives.md
index caf7b5905..da1b6dd79 100644
--- a/docs/rules/no-dupe-use-directives.md
+++ b/docs/rules/no-dupe-use-directives.md
@@ -15,8 +15,6 @@ since: 'v2.14.0'
We can define any number of `use:` directive with the same action, but duplicate directives with the exact same action and expression are probably a mistake.
This rule reports reports `use:` directives with exactly the same action and expression.
-
-
```svelte
@@ -33,8 +31,6 @@ This rule reports reports `use:` directives with exactly the same action and exp
```
-
-
## :wrench: Options
Nothing.
diff --git a/docs/rules/no-dynamic-slot-name.md b/docs/rules/no-dynamic-slot-name.md
index efe009cfc..f9a84df2f 100644
--- a/docs/rules/no-dynamic-slot-name.md
+++ b/docs/rules/no-dynamic-slot-name.md
@@ -20,8 +20,6 @@ Dynamic `` names are not allowed in Svelte, so you must use static names.
The auto-fix of this rule can be replaced with a static `` name if the expression given to the `` name is static and resolvable.
-
-
```svelte
@@ -37,8 +35,6 @@ The auto-fix of this rule can be replaced with a static `` name if the exp
```
-
-
## :wrench: Options
Nothing.
diff --git a/docs/rules/no-export-load-in-svelte-module-in-kit-pages.md b/docs/rules/no-export-load-in-svelte-module-in-kit-pages.md
index bf65ec2d3..654bde491 100644
--- a/docs/rules/no-export-load-in-svelte-module-in-kit-pages.md
+++ b/docs/rules/no-export-load-in-svelte-module-in-kit-pages.md
@@ -30,8 +30,6 @@ And the API has changed.
}
-
-
```svelte
@@ -46,8 +44,6 @@ And the API has changed.
```
-
-
## :wrench: Options
Nothing. But if you are not using the default routes folder, please set configuration according to the [user guide](../user-guide.md#settings-svelte-kit).
diff --git a/docs/rules/no-extra-reactive-curlies.md b/docs/rules/no-extra-reactive-curlies.md
index ff2540e32..6d8a9f63e 100644
--- a/docs/rules/no-extra-reactive-curlies.md
+++ b/docs/rules/no-extra-reactive-curlies.md
@@ -16,8 +16,6 @@ since: 'v2.4.0'
This rule reports if curly brackets (`{` and `}`) are used unnecessarily around a reactive statement body containing only a single expression.
-
-
```svelte
@@ -34,8 +32,6 @@ This rule reports if curly brackets (`{` and `}`) are used unnecessarily around
```
-
-
## :wrench: Options
Nothing.
diff --git a/docs/rules/no-goto-without-base.md b/docs/rules/no-goto-without-base.md
index ab36738e7..757745120 100644
--- a/docs/rules/no-goto-without-base.md
+++ b/docs/rules/no-goto-without-base.md
@@ -14,8 +14,6 @@ since: 'v2.36.0-next.9'
This rule reports navigation using SvelteKit's `goto()` function without prefixing a relative URL with the base path. If a non-prefixed relative URL is used for navigation, the `goto` function navigates away from the base path, which is usually not what you wanted to do (for external URLs, `window.location = url` should be used instead).
-
-
```svelte
@@ -43,8 +41,6 @@ This rule reports navigation using SvelteKit's `goto()` function without prefixi
```
-
-
## :wrench: Options
Nothing.
diff --git a/docs/rules/no-ignored-unsubscribe.md b/docs/rules/no-ignored-unsubscribe.md
index bad7242e7..9cae0bb17 100644
--- a/docs/rules/no-ignored-unsubscribe.md
+++ b/docs/rules/no-ignored-unsubscribe.md
@@ -17,8 +17,6 @@ This rule fails if an "unsubscriber" returned by call to `subscribe()` is neithe
One should always unsubscribe from a store when it is no longer needed. Otherwise, the subscription will remain active and constitute a **memory leak**.
This rule helps to find such cases by ensuring that the unsubscriber (the return value from the store's `subscribe` method) is not ignored.
-
-
```svelte
@@ -35,8 +33,6 @@ This rule helps to find such cases by ensuring that the unsubscriber (the return
```
-
-
## :wrench: Options
Nothing.
diff --git a/docs/rules/no-immutable-reactive-statements.md b/docs/rules/no-immutable-reactive-statements.md
index 48ce89dbb..956e10fbf 100644
--- a/docs/rules/no-immutable-reactive-statements.md
+++ b/docs/rules/no-immutable-reactive-statements.md
@@ -14,8 +14,6 @@ since: 'v2.27.0'
This rule reports if all variables referenced in reactive statements are immutable. That reactive statement is immutable and not reactive.
-
-
```svelte
@@ -54,8 +52,6 @@ This rule reports if all variables referenced in reactive statements are immutab
```
-
-
## :wrench: Options
Nothing.
diff --git a/docs/rules/no-inline-styles.md b/docs/rules/no-inline-styles.md
index dcf2b237f..4c16aae46 100644
--- a/docs/rules/no-inline-styles.md
+++ b/docs/rules/no-inline-styles.md
@@ -14,8 +14,6 @@ since: 'v2.35.0'
This rule reports all attributes and directives that would compile to inline styles. This is mainly useful when adding Content Security Policy to your app, as having inline styles requires the `style-src: 'unsafe-inline'` directive, which is generally discouraged and unsafe.
-
-
```svelte
@@ -41,8 +39,6 @@ This rule reports all attributes and directives that would compile to inline sty
Hello World!
```
-
-
## :wrench: Options
```json
diff --git a/docs/rules/no-inner-declarations.md b/docs/rules/no-inner-declarations.md
index b85184eac..ee1e0e591 100644
--- a/docs/rules/no-inner-declarations.md
+++ b/docs/rules/no-inner-declarations.md
@@ -21,8 +21,6 @@ This rule supports [svelte-eslint-parser]'s AST.
[svelte-eslint-parser]: https://github.com/sveltejs/svelte-eslint-parser
-
-
```svelte
@@ -43,8 +41,6 @@ This rule supports [svelte-eslint-parser]'s AST.
```
-
-
## :wrench: Options
```json
diff --git a/docs/rules/no-inspect.md b/docs/rules/no-inspect.md
index f9650f59e..07eb48d1c 100644
--- a/docs/rules/no-inspect.md
+++ b/docs/rules/no-inspect.md
@@ -14,8 +14,6 @@ since: 'v2.45.0'
This rule reports usages of `$inspect`.
-
-
```svelte
@@ -26,8 +24,6 @@ This rule reports usages of `$inspect`.
```
-
-
## :wrench: Options
Nothing.
diff --git a/docs/rules/no-not-function-handler.md b/docs/rules/no-not-function-handler.md
index 300ae106e..3162a4254 100644
--- a/docs/rules/no-not-function-handler.md
+++ b/docs/rules/no-not-function-handler.md
@@ -17,8 +17,6 @@ since: 'v0.5.0'
This rule reports where you used not function value in event handlers.
If you use a non-function value for the event handler, it event handler will not be called. It's almost always a mistake. You may have written a lot of unnecessary curly braces.
-
-
```svelte
@@ -43,8 +41,6 @@ If you use a non-function value for the event handler, it event handler will not
```
-
-
## :wrench: Options
Nothing.
diff --git a/docs/rules/no-object-in-text-mustaches.md b/docs/rules/no-object-in-text-mustaches.md
index 0cc9c77cf..c6f2a3587 100644
--- a/docs/rules/no-object-in-text-mustaches.md
+++ b/docs/rules/no-object-in-text-mustaches.md
@@ -17,8 +17,6 @@ since: 'v0.5.0'
This rule disallows the use of objects in text mustache interpolation.
When you use an object for text interpolation, it is drawn as `[object Object]`. It's almost always a mistake. You may have written a lot of unnecessary curly braces.
-
-
```svelte
@@ -36,8 +34,6 @@ When you use an object for text interpolation, it is drawn as `[object Object]`.
```
-
-
## :wrench: Options
Nothing.
diff --git a/docs/rules/no-reactive-functions.md b/docs/rules/no-reactive-functions.md
index 0416a6229..ff88faf8b 100644
--- a/docs/rules/no-reactive-functions.md
+++ b/docs/rules/no-reactive-functions.md
@@ -16,8 +16,6 @@ since: 'v2.5.0'
This rule reports whenever a function is defined in a reactive statement. This isn't necessary, as each time the function is executed it'll already have access to the latest values necessary. Redefining the function in the reactive statement is just a waste of CPU cycles.
-
-
```svelte
@@ -42,8 +40,6 @@ This rule reports whenever a function is defined in a reactive statement. This i
```
-
-
## :wrench: Options
Nothing
diff --git a/docs/rules/no-reactive-literals.md b/docs/rules/no-reactive-literals.md
index 42618f3b2..286eded6b 100644
--- a/docs/rules/no-reactive-literals.md
+++ b/docs/rules/no-reactive-literals.md
@@ -16,8 +16,6 @@ since: 'v2.4.0'
This rule reports on any assignment of a static, unchanging value within a reactive statement because it's not necessary.
-
-
```svelte
@@ -31,8 +29,6 @@ This rule reports on any assignment of a static, unchanging value within a react
```
-
-
## :wrench: Options
Nothing.
diff --git a/docs/rules/no-reactive-reassign.md b/docs/rules/no-reactive-reassign.md
index 00c729d54..2635d30a0 100644
--- a/docs/rules/no-reactive-reassign.md
+++ b/docs/rules/no-reactive-reassign.md
@@ -14,8 +14,6 @@ since: 'v2.27.0'
This rule aims to prevent unintended behavior caused by modification or reassignment of reactive values.
-
-
```svelte
@@ -39,8 +37,6 @@ This rule aims to prevent unintended behavior caused by modification or reassign
```
-
-
## :wrench: Options
```json
@@ -58,8 +54,6 @@ This rule aims to prevent unintended behavior caused by modification or reassign
### `{ "props": true }`
-
-
```svelte
@@ -84,12 +78,8 @@ This rule aims to prevent unintended behavior caused by modification or reassign
```
-
-
### `{ "props": false }`
-
-
```svelte
@@ -116,8 +106,6 @@ This rule aims to prevent unintended behavior caused by modification or reassign
```
-
-
## :rocket: Version
This rule was introduced in eslint-plugin-svelte v2.27.0
diff --git a/docs/rules/no-restricted-html-elements.md b/docs/rules/no-restricted-html-elements.md
index 1a80a1e17..409a16f72 100644
--- a/docs/rules/no-restricted-html-elements.md
+++ b/docs/rules/no-restricted-html-elements.md
@@ -14,8 +14,6 @@ since: 'v2.31.0'
This rule reports to usage of resticted HTML elements.
-
-
```svelte
@@ -36,12 +34,8 @@ This rule reports to usage of resticted HTML elements.
```
-
-
---
-
-
```svelte
@@ -62,8 +56,6 @@ This rule reports to usage of resticted HTML elements.
```
-
-
## :wrench: Options
This rule takes a list of strings, where each string is an HTML element name to be restricted:
diff --git a/docs/rules/no-shorthand-style-property-overrides.md b/docs/rules/no-shorthand-style-property-overrides.md
index 048cc6048..3e45229d9 100644
--- a/docs/rules/no-shorthand-style-property-overrides.md
+++ b/docs/rules/no-shorthand-style-property-overrides.md
@@ -18,8 +18,6 @@ This rule reports when a shorthand style property overrides a previously defined
This rule was inspired by [Stylelint's declaration-block-no-shorthand-property-overrides rule](https://stylelint.io/user-guide/rules/list/declaration-block-no-shorthand-property-overrides/).
-
-
```svelte
@@ -39,8 +37,6 @@ This rule was inspired by [Stylelint's declaration-block-no-shorthand-property-o
...
```
-
-
## :wrench: Options
Nothing.
diff --git a/docs/rules/no-spaces-around-equal-signs-in-attribute.md b/docs/rules/no-spaces-around-equal-signs-in-attribute.md
index 22f44743d..72764166c 100644
--- a/docs/rules/no-spaces-around-equal-signs-in-attribute.md
+++ b/docs/rules/no-spaces-around-equal-signs-in-attribute.md
@@ -16,8 +16,6 @@ since: 'v2.3.0'
This rule disallows spaces around equal signs in attributes
-
-
@@ -41,8 +39,6 @@ This rule disallows spaces around equal signs in attributes
-
-
## :wrench: Options
Nothing.
diff --git a/docs/rules/no-store-async.md b/docs/rules/no-store-async.md
index 158aee435..5285688aa 100644
--- a/docs/rules/no-store-async.md
+++ b/docs/rules/no-store-async.md
@@ -15,8 +15,6 @@ since: 'v2.7.0'
This rule reports all uses of async/await inside svelte stores.
Because it causes issues with the auto-unsubscribing features.
-
-
```js
@@ -35,8 +33,6 @@ const r2 = readable(false, async () => {});
const d2 = derived(a1, async ($a1) => {});
```
-
-
## :wrench: Options
Nothing.
diff --git a/docs/rules/no-svelte-internal.md b/docs/rules/no-svelte-internal.md
index 7d39327d2..a1160b2d3 100644
--- a/docs/rules/no-svelte-internal.md
+++ b/docs/rules/no-svelte-internal.md
@@ -14,8 +14,6 @@ since: 'v2.39.0'
This rule reports the use of the deprecated API `svelte/internal` and `svelte/internal/xxx`. `svelte/internal` is deprecated in Svelte 5. And it will be deleted in Svelte 6. These APIs can change in breaking ways at any time without notice.
-
-
```svelte
@@ -36,8 +34,6 @@ This rule reports the use of the deprecated API `svelte/internal` and `svelte/in
```
-
-
## :wrench: Options
Nothing.
diff --git a/docs/rules/no-target-blank.md b/docs/rules/no-target-blank.md
index 358417b52..097f0f1c7 100644
--- a/docs/rules/no-target-blank.md
+++ b/docs/rules/no-target-blank.md
@@ -14,8 +14,6 @@ since: 'v0.0.4'
This rule disallows using `target="_blank"` attribute without `rel="noopener noreferrer"` to avoid a security vulnerability in legacy browsers where a page can trigger a navigation in the opener regardless of origin ([see here for more details](https://mathiasbynens.github.io/rel-noopener/)).
-
-
```svelte
@@ -30,8 +28,6 @@ This rule disallows using `target="_blank"` attribute without `rel="noopener nor
link
```
-
-
## :wrench: Options
```json
@@ -51,8 +47,6 @@ This rule disallows using `target="_blank"` attribute without `rel="noopener nor
### `{ allowReferrer: false }` (default)
-
-
```svelte
@@ -67,12 +61,8 @@ This rule disallows using `target="_blank"` attribute without `rel="noopener nor
link
```
-
-
### `{ allowReferrer: true }`
-
-
```svelte
@@ -87,12 +77,8 @@ This rule disallows using `target="_blank"` attribute without `rel="noopener nor
link
```
-
-
### `{ "enforceDynamicLinks": "always" }` (default)
-
-
```svelte
@@ -107,12 +93,8 @@ This rule disallows using `target="_blank"` attribute without `rel="noopener nor
link
```
-
-
### `{ "enforceDynamicLinks": "never" }`
-
-
```svelte
@@ -127,8 +109,6 @@ This rule disallows using `target="_blank"` attribute without `rel="noopener nor
link
```
-
-
## :rocket: Version
This rule was introduced in eslint-plugin-svelte v0.0.4
diff --git a/docs/rules/no-trailing-spaces.md b/docs/rules/no-trailing-spaces.md
index c48bf6e19..ab4f9a969 100644
--- a/docs/rules/no-trailing-spaces.md
+++ b/docs/rules/no-trailing-spaces.md
@@ -19,8 +19,6 @@ This rule supports HTML comments generated by [svelte-eslint-parser].
[svelte-eslint-parser]: https://github.com/sveltejs/svelte-eslint-parser
-
-
@@ -47,8 +45,6 @@ This rule supports HTML comments generated by [svelte-eslint-parser].
-
-
## :wrench: Options
```jsonc
diff --git a/docs/rules/no-unknown-style-directive-property.md b/docs/rules/no-unknown-style-directive-property.md
index 9fbad9892..340517afd 100644
--- a/docs/rules/no-unknown-style-directive-property.md
+++ b/docs/rules/no-unknown-style-directive-property.md
@@ -20,8 +20,6 @@ This rule was inspired by [Stylelint's property-no-unknown rule](https://styleli
Note that this rule only checks the `style:property` directive. If you want to check inside the `style` attribute and `style` element, consider introducing [Stylelint](https://stylelint.io/).
-
-
```svelte
@@ -40,8 +38,6 @@ Note that this rule only checks the `style:property` directive. If you want to c
...
```
-
-
## :wrench: Options
```json
diff --git a/docs/rules/no-unused-class-name.md b/docs/rules/no-unused-class-name.md
index 3bb5cf4a5..ecfef4888 100644
--- a/docs/rules/no-unused-class-name.md
+++ b/docs/rules/no-unused-class-name.md
@@ -14,8 +14,6 @@ since: 'v2.31.0'
This rule is aimed at reducing unused classes in the HTML template. While `svelte-check` will produce the `css-unused-selector` if your `
```
-
-
## :wrench: Options
```json
diff --git a/docs/rules/no-unused-svelte-ignore.md b/docs/rules/no-unused-svelte-ignore.md
index 150546202..9313ece97 100644
--- a/docs/rules/no-unused-svelte-ignore.md
+++ b/docs/rules/no-unused-svelte-ignore.md
@@ -16,8 +16,6 @@ since: 'v0.19.0'
This rule warns unnecessary `svelte-ignore` comments.
-
-
```svelte
@@ -34,8 +32,6 @@ This rule warns unnecessary `svelte-ignore` comments.
```
-
-
## :wrench: Options
Nothing.
diff --git a/docs/rules/no-useless-mustaches.md b/docs/rules/no-useless-mustaches.md
index 4d4826fb5..b4bf377f9 100644
--- a/docs/rules/no-useless-mustaches.md
+++ b/docs/rules/no-useless-mustaches.md
@@ -17,8 +17,6 @@ since: 'v0.0.4'
This rule reports mustache interpolation with a string literal value.
The mustache interpolation with a string literal value can be changed to a static contents.
-
-
```svelte
@@ -38,8 +36,6 @@ Lorem ipsum {foo}
```
-
-
## :wrench: Options
```json
@@ -59,8 +55,6 @@ Lorem ipsum {foo}
### `"ignoreIncludesComment": true`
-
-
```svelte
@@ -75,12 +69,8 @@ Lorem ipsum {foo}
```
-
-
### `"ignoreStringEscape": true`
-
-
```svelte
@@ -89,8 +79,6 @@ Lorem ipsum {foo}
```
-
-
## :rocket: Version
This rule was introduced in eslint-plugin-svelte v0.0.4
diff --git a/docs/rules/prefer-class-directive.md b/docs/rules/prefer-class-directive.md
index 4f8fa2357..ab68bb53b 100644
--- a/docs/rules/prefer-class-directive.md
+++ b/docs/rules/prefer-class-directive.md
@@ -16,8 +16,6 @@ since: 'v0.0.1'
This rule aims to replace a class with ternary operator with the class directive.
-
-
```svelte
@@ -35,8 +33,6 @@ This rule aims to replace a class with ternary operator with the class directive
```
-
-
You cannot enforce this style by using [prettier-plugin-svelte]. That is, this rule does not conflict with [prettier-plugin-svelte] and can be used with [prettier-plugin-svelte].
[prettier-plugin-svelte]: https://github.com/sveltejs/prettier-plugin-svelte
diff --git a/docs/rules/prefer-destructured-store-props.md b/docs/rules/prefer-destructured-store-props.md
index dd45b3973..66ac5a1d9 100644
--- a/docs/rules/prefer-destructured-store-props.md
+++ b/docs/rules/prefer-destructured-store-props.md
@@ -18,8 +18,6 @@ This rule reports on directly accessing properties of a store containing an obje
An example of the improvements can be see in this [REPL](https://svelte.dev/repl/7de86fea94ff40c48abb82da534dfb89)
-
-
```svelte
@@ -36,8 +34,6 @@ An example of the improvements can be see in this [REPL](https://svelte.dev/repl
{$store.foo}
```
-
-
## :wrench: Options
Nothing
diff --git a/docs/rules/prefer-style-directive.md b/docs/rules/prefer-style-directive.md
index f05ef22d8..90080706b 100644
--- a/docs/rules/prefer-style-directive.md
+++ b/docs/rules/prefer-style-directive.md
@@ -18,8 +18,6 @@ This rule aims to replace a style attribute with the style directive.
Style directive were added in Svelte v3.46.
-
-
@@ -51,8 +49,6 @@ Style directive were added in Svelte v3.46.
-
-
You cannot enforce this style by using [prettier-plugin-svelte]. That is, this rule does not conflict with [prettier-plugin-svelte] and can be used with [prettier-plugin-svelte].
[prettier-plugin-svelte]: https://github.com/sveltejs/prettier-plugin-svelte
diff --git a/docs/rules/require-each-key.md b/docs/rules/require-each-key.md
index 959c8257c..03bf62623 100644
--- a/docs/rules/require-each-key.md
+++ b/docs/rules/require-each-key.md
@@ -14,8 +14,6 @@ since: 'v2.28.0'
This rule reports `{#each}` block without key
-
-
```svelte
@@ -34,8 +32,6 @@ This rule reports `{#each}` block without key
{/each}
```
-
-
## :wrench: Options
Nothing.
diff --git a/docs/rules/require-event-dispatcher-types.md b/docs/rules/require-event-dispatcher-types.md
index d035b2fca..e89b0ec03 100644
--- a/docs/rules/require-event-dispatcher-types.md
+++ b/docs/rules/require-event-dispatcher-types.md
@@ -14,8 +14,6 @@ since: 'v2.16.0'
This rule is aimed to enforce type parameters when calling `createEventDispatcher`. Adding types makes all `dispatch` calls as well as all event listeners typechecked. For more information, see the [svelte docs](https://github.com/sveltejs/language-tools/blob/master/docs/preprocessors/typescript.md#typing-component-events).
-
-
```svelte
@@ -35,8 +33,6 @@ This rule is aimed to enforce type parameters when calling `createEventDispatche
```
-
-
## :wrench: Options
Nothing.
diff --git a/docs/rules/require-optimized-style-attribute.md b/docs/rules/require-optimized-style-attribute.md
index a70633b57..dc526df82 100644
--- a/docs/rules/require-optimized-style-attribute.md
+++ b/docs/rules/require-optimized-style-attribute.md
@@ -68,8 +68,6 @@ div.setAttribute('style', `font-size: 12px; color: ${color}; ${/* transformStyle
Examples:
-
-
```svelte
@@ -92,8 +90,6 @@ Examples:
```
-
-
## :wrench: Options
Nothing.
diff --git a/docs/rules/require-store-callbacks-use-set-param.md b/docs/rules/require-store-callbacks-use-set-param.md
index bc8ca71c8..4995fa495 100644
--- a/docs/rules/require-store-callbacks-use-set-param.md
+++ b/docs/rules/require-store-callbacks-use-set-param.md
@@ -15,8 +15,6 @@ since: 'v2.12.0'
This rule disallows if `readable` / `writable` store's setter function doesn't use `set` parameter.
This rule doesn't check `derived` store. Therefore if you set a updated value asynchronously, please don't forget to use `set` function.
-
-
```svelte
@@ -63,8 +61,6 @@ This rule doesn't check `derived` store. Therefore if you set a updated value as
```
-
-
## :wrench: Options
Nothing.
diff --git a/docs/rules/require-store-reactive-access.md b/docs/rules/require-store-reactive-access.md
index deac4f002..6ade59c08 100644
--- a/docs/rules/require-store-reactive-access.md
+++ b/docs/rules/require-store-reactive-access.md
@@ -17,8 +17,6 @@ since: 'v2.12.0'
This rule disallow to use of the store itself as an operand.
You should access the store value using the `$` prefix or the `get` function.
-
-
```svelte
@@ -59,8 +57,6 @@ You should access the store value using the `$` prefix or the `get` function.
```
-
-
This rule checks the usage of store variables only if the store can be determined within a single file.
However, when using `@typescript-eslint/parser` and full type information, this rule uses the type information to determine if the expression is a store.
diff --git a/docs/rules/require-stores-init.md b/docs/rules/require-stores-init.md
index 595be46b7..13dcc9985 100644
--- a/docs/rules/require-stores-init.md
+++ b/docs/rules/require-stores-init.md
@@ -14,8 +14,6 @@ since: 'v2.5.0'
This rule is aimed to enforce initial values when initializing the Svelte stores.
-
-
```js
@@ -34,8 +32,6 @@ export const r2 = readable();
export const d2 = derived([a, b], () => {});
```
-
-
## :wrench: Options
Nothing.
diff --git a/docs/rules/shorthand-attribute.md b/docs/rules/shorthand-attribute.md
index 40cc4acee..8a43e3c16 100644
--- a/docs/rules/shorthand-attribute.md
+++ b/docs/rules/shorthand-attribute.md
@@ -16,8 +16,6 @@ since: 'v0.5.0'
This rule enforces the use of the shorthand syntax in attribute.
-
-
@@ -36,8 +34,6 @@ This rule enforces the use of the shorthand syntax in attribute.
-
-
## :wrench: Options
```json
diff --git a/docs/rules/shorthand-directive.md b/docs/rules/shorthand-directive.md
index 75ada965c..a1b8d8314 100644
--- a/docs/rules/shorthand-directive.md
+++ b/docs/rules/shorthand-directive.md
@@ -16,8 +16,6 @@ since: 'v0.24.0'
This rule enforces the use of the shorthand syntax in directives.
-
-
@@ -43,8 +41,6 @@ This rule enforces the use of the shorthand syntax in directives.
-
-
## :wrench: Options
```json
diff --git a/docs/rules/sort-attributes.md b/docs/rules/sort-attributes.md
index 88652e3f7..4f45af126 100644
--- a/docs/rules/sort-attributes.md
+++ b/docs/rules/sort-attributes.md
@@ -35,8 +35,6 @@ The default order is:
- `animate:` directive.
- `let:` directives. (Alphabetical order within the same group.)
-
-
@@ -101,12 +99,8 @@ The default order is:
-
-
If there is a spread attribute between the attributes, it will not be reported as changing the order can change the behavior.
-
-
```svelte
@@ -121,8 +115,6 @@ If there is a spread attribute between the attributes, it will not be reported a
```
-
-
## :wrench: Options
```jsonc
@@ -198,8 +190,6 @@ You can use the following formats for names or patterns:
### `{ order: [ /*See below*/ ] }`
-
-
```svelte
@@ -267,8 +257,6 @@ You can use the following formats for names or patterns:
```
-
-
## :rocket: Version
This rule was introduced in eslint-plugin-svelte v2.4.0
diff --git a/docs/rules/spaced-html-comment.md b/docs/rules/spaced-html-comment.md
index 2a7f721de..c251212b6 100644
--- a/docs/rules/spaced-html-comment.md
+++ b/docs/rules/spaced-html-comment.md
@@ -16,8 +16,6 @@ since: 'v0.0.1'
This rule will enforce consistency of spacing after the start of a comment ``.
-
-
```svelte
@@ -30,8 +28,6 @@ This rule will enforce consistency of spacing after the start of a comment `
```
-
-
You cannot enforce this style by using [prettier-plugin-svelte]. That is, this rule does not conflict with [prettier-plugin-svelte] and can be used with [prettier-plugin-svelte].
[prettier-plugin-svelte]: https://github.com/sveltejs/prettier-plugin-svelte
diff --git a/docs/rules/valid-compile.md b/docs/rules/valid-compile.md
index 410f8e4fd..0051a70c4 100644
--- a/docs/rules/valid-compile.md
+++ b/docs/rules/valid-compile.md
@@ -16,8 +16,6 @@ since: 'v0.7.0'
This rule uses Svelte compiler to check the source code.
-
-
```svelte
@@ -33,8 +31,6 @@ This rule uses Svelte compiler to check the source code.
```
-
-
Note that we exclude reports for some checks, such as `missing-declaration`, and `dynamic-slot-name`, which you can check with different ESLint rules.
### Using `svelte.config.js`
@@ -91,8 +87,6 @@ export default {
- `ignoreWarnings` ... If set to `true`, ignores any warnings other than fatal errors reported by the svelte compiler.
-
-
```svelte
@@ -105,8 +99,6 @@ export default {
```
-
-
## :rocket: Version
This rule was introduced in eslint-plugin-svelte v0.7.0
diff --git a/docs/rules/valid-each-key.md b/docs/rules/valid-each-key.md
index 9b58f57a5..bf2d47619 100644
--- a/docs/rules/valid-each-key.md
+++ b/docs/rules/valid-each-key.md
@@ -14,8 +14,6 @@ since: 'v2.28.0'
This rule reports that `{#each}` block keys does not use the variables which are defined by the `{#each}` block.
-
-
```svelte
@@ -43,8 +41,6 @@ This rule reports that `{#each}` block keys does not use the variables which are
{/each}
```
-
-
## :wrench: Options
Nothing.
diff --git a/docs/rules/valid-prop-names-in-kit-pages.md b/docs/rules/valid-prop-names-in-kit-pages.md
index 5d1754b5b..2043bb6d5 100644
--- a/docs/rules/valid-prop-names-in-kit-pages.md
+++ b/docs/rules/valid-prop-names-in-kit-pages.md
@@ -26,8 +26,6 @@ At SvelteKit v1.0.0-next.405, instead of having multiple props corresponding to
}
-
-
```svelte
@@ -50,8 +48,6 @@ At SvelteKit v1.0.0-next.405, instead of having multiple props corresponding to
{foo}, {bar}
```
-
-
## :wrench: Options
Nothing. But if use are using not default routes folder, please set configuration according to the [user guide](../user-guide.md#settings-svelte-kit).
diff --git a/packages/eslint-plugin-svelte/src/utils/load-module.ts b/packages/eslint-plugin-svelte/src/utils/load-module.ts
index 1c29ef8aa..1676ee4a3 100644
--- a/packages/eslint-plugin-svelte/src/utils/load-module.ts
+++ b/packages/eslint-plugin-svelte/src/utils/load-module.ts
@@ -43,10 +43,3 @@ export function loadModule(context: RuleContext, name: string): R | null {
}
return null;
}
-
-/** Load modules for browser */
-export async function loadModulesForBrowser(): Promise {
- const [sass, typescript] = await Promise.all([import('sass'), import('typescript')]);
- cache4b.set('sass', sass);
- cache4b.set('typescript', typescript);
-}
diff --git a/packages/eslint-plugin-svelte/tools/new-rule.ts b/packages/eslint-plugin-svelte/tools/new-rule.ts
index 16c5ae3ad..e1a93318e 100644
--- a/packages/eslint-plugin-svelte/tools/new-rule.ts
+++ b/packages/eslint-plugin-svelte/tools/new-rule.ts
@@ -94,8 +94,6 @@ tester.run('${ruleId}', rule as any, loadTestCases('${ruleId}'));
This rule reports ???.
-
-
\`\`\`svelte
@@ -109,8 +107,6 @@ This rule reports ???.
\`\`\`
-
-
## :wrench: Options
\`\`\`json
diff --git a/packages/eslint-plugin-svelte/tools/update-docs.ts b/packages/eslint-plugin-svelte/tools/update-docs.ts
index e51db560a..4702f5273 100644
--- a/packages/eslint-plugin-svelte/tools/update-docs.ts
+++ b/packages/eslint-plugin-svelte/tools/update-docs.ts
@@ -185,8 +185,8 @@ ${
public adjustCodeBlocks() {
// Adjust the necessary blank lines before and after the code block so that GitHub can recognize `.md`.
- this.content = this.content.replace(/()\n+```/gu, '$1\n\n```');
- this.content = this.content.replace(/```\n+<\/ESLintCodeBlock>/gu, '```\n\n');
+ this.content = this.content.replace(/\n+```svelte/gu, '\n\n```svelte');
+ this.content = this.content.replace(/\n+```\n+/gu, '\n```\n\n');
return this;
}