pageClass | sidebarDepth | title | description | since |
---|---|---|---|---|
rule-details |
0 |
svelte/no-undefined-print |
Disallow from printing `undefined` |
v0.0.1 |
Disallow from printing
undefined
- ⚙️ This rule is included in
"plugin:svelte/recommended"
.
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.
<script>
/* eslint svelte/no-at-html-tags: "error" */
</script>
<!-- ✓ GOOD -->
{foo}
<!-- ✗ BAD -->
{@html foo}
Nothing.
If you are certain the content passed to {@html}
is sanitized HTML you can disable this rule.
This rule was introduced in eslint-plugin-svelte v0.0.1