# svelte/no-raw-special-elements

Checks for invalid raw HTML elements

  • 🔧 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 are not valid in Svelte, despite them working in versions previous to v5. Such elements must be prefixed with svelte:.

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

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

<!-- ✗ BAD -->
Special head element is deprecated in v5, use svelte:head instead. (svelte/no-raw-special-elements)
<head>
<title>Invalid</title> </head>

# 🔧 Options

Nothing.

# 📚 Further Reading

# 🚀 Version

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

# 🔍 Implementation