Skip to content

Commit 6dd3db6

Browse files
committed
docs(no-raw-special-elements): update docs
1 parent 5c2f561 commit 6dd3db6

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,6 @@ These rules relate to possible syntax or logic errors in Svelte code:
320320
| Rule ID | Description | |
321321
|:--------|:------------|:---|
322322
| [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. | |
323-
| [svelte/no-raw-special-elements](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-raw-special-elements/) | Recommends not using raw special elements in Svelte versions previous to 5. | :wrench: |
324323
| [svelte/no-dom-manipulating](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-dom-manipulating/) | disallow DOM manipulating | |
325324
| [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: |
326325
| [svelte/no-dupe-on-directives](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-dupe-on-directives/) | disallow duplicate `on:` directives | |
@@ -330,6 +329,7 @@ These rules relate to possible syntax or logic errors in Svelte code:
330329
| [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. | |
331330
| [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: |
332331
| [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: |
332+
| [svelte/no-raw-special-elements](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-raw-special-elements/) | Checks for invalid raw HTML elements | :wrench: |
333333
| [svelte/no-reactive-reassign](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-reactive-reassign/) | disallow reassigning reactive values | |
334334
| [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: |
335335
| [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 | |

docs/rules.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ These rules relate to possible syntax or logic errors in Svelte code:
1717
| Rule ID | Description | |
1818
| :------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------- | :------------- |
1919
| [svelte/infinite-reactive-loop](./rules/infinite-reactive-loop.md) | Svelte runtime prevents calling the same reactive statement twice in a microtask. But between different microtask, it doesn't prevent. | |
20-
| [svelte/no-raw-special-elements](./rules/no-raw-special-elements.md) | Recommends not using raw special elements in Svelte versions previous to 5. | :wrench: |
2120
| [svelte/no-dom-manipulating](./rules/no-dom-manipulating.md) | disallow DOM manipulating | |
2221
| [svelte/no-dupe-else-if-blocks](./rules/no-dupe-else-if-blocks.md) | disallow duplicate conditions in `{#if}` / `{:else if}` chains | :star: |
2322
| [svelte/no-dupe-on-directives](./rules/no-dupe-on-directives.md) | disallow duplicate `on:` directives | |
@@ -27,6 +26,7 @@ These rules relate to possible syntax or logic errors in Svelte code:
2726
| [svelte/no-export-load-in-svelte-module-in-kit-pages](./rules/no-export-load-in-svelte-module-in-kit-pages.md) | disallow exporting load functions in `*.svelte` module in SvelteKit page components. | |
2827
| [svelte/no-not-function-handler](./rules/no-not-function-handler.md) | disallow use of not function in event handler | :star: |
2928
| [svelte/no-object-in-text-mustaches](./rules/no-object-in-text-mustaches.md) | disallow objects in text mustache interpolation | :star: |
29+
| [svelte/no-raw-special-elements](./rules/no-raw-special-elements.md) | Checks for invalid raw HTML elements | :wrench: |
3030
| [svelte/no-reactive-reassign](./rules/no-reactive-reassign.md) | disallow reassigning reactive values | |
3131
| [svelte/no-shorthand-style-property-overrides](./rules/no-shorthand-style-property-overrides.md) | disallow shorthand style properties that override related longhand properties | :star: |
3232
| [svelte/no-store-async](./rules/no-store-async.md) | disallow using async/await inside svelte stores because it causes issues with the auto-unsubscribing features | |

docs/rules/no-raw-special-elements.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22
pageClass: 'rule-details'
33
sidebarDepth: 0
44
title: 'svelte/no-raw-special-elements'
5-
description: 'Recommends not using raw special elements in Svelte versions previous to 5.'
5+
description: 'Checks for invalid raw HTML elements'
66
since: 'v3.0.0-next.1'
77
---
88

99
# svelte/no-raw-special-elements
1010

11-
> Recommends not using raw special elements in Svelte versions previous to 5.
11+
> Checks for invalid raw HTML elements
1212
1313
- :wrench: The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) can automatically fix some of the problems reported by this rule.
1414

1515
## :book: Rule Details
1616

17-
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:`.
17+
This rule reports the usage of `head`, `body`, `window`, `document`, `element` and `options` HTML elements. These elements are not valid in Svelte, despite them working in versions previous to v5. Such elements must be prefixed with `svelte:`.
1818

1919
<!--eslint-skip-->
2020

packages/eslint-plugin-svelte/src/rule-types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ export interface RuleOptions {
191191
*/
192192
'svelte/no-object-in-text-mustaches'?: Linter.RuleEntry<[]>
193193
/**
194-
* Recommends not using raw special elements in Svelte versions previous to 5.
194+
* Checks for invalid raw HTML elements
195195
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-raw-special-elements/
196196
*/
197197
'svelte/no-raw-special-elements'?: Linter.RuleEntry<[]>

packages/eslint-plugin-svelte/src/rules/no-raw-special-elements.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const VALID_PREFIX = 'svelte:';
77
export default createRule('no-raw-special-elements', {
88
meta: {
99
docs: {
10-
description: 'Recommends not using raw special elements in Svelte versions previous to 5.',
10+
description: 'Checks for invalid raw HTML elements',
1111
category: 'Possible Errors',
1212
// TODO: Switch to recommended in the major version
1313
recommended: false

0 commit comments

Comments
 (0)