Skip to content

Latest commit

 

History

History
52 lines (35 loc) · 1.56 KB

no-deprecated-raw-special-elements.md

File metadata and controls

52 lines (35 loc) · 1.56 KB
pageClass sidebarDepth title description since
rule-details
0
svelte/no-deprecated-raw-special-elements
Recommends not using raw special elements in Svelte versions previous to 5.
v3.0.0-next.1

svelte/no-deprecated-raw-special-elements

Recommends not using raw special elements in Svelte versions previous to 5.

  • 🔧 The --fix option on the command line can automatically fix some of the problems reported by this rule.

📖 Rule Details

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:.

<script>
  /* eslint svelte/no-deprecated-raw-special-elements: "error" */
</script>

<!-- ✓ GOOD -->
<svelte:head>
  <title>Valid</title>
</svelte:head>

<!-- ✗ BAD -->
<head>
  <title>Invalid</title>
</head>

🔧 Options

Nothing.

📚 Further Reading

🚀 Version

This rule was introduced in eslint-plugin-svelte v3.0.0-next.1

🔍 Implementation