-
-
Notifications
You must be signed in to change notification settings - Fork 53
Closed
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needednew rule
Description
Motivation
Svelte can be used as a strongly component-based system where most of the elements used are components. Therefore, it makes sense that an error is raised whenever an element is specified but should not be used.
Description
Disallows certain built-in HTML elements from being used, instead there's likely a component that should be used in its place. For example, instead of using the h1
element, import and use the Heading
element.
Examples
<script>
import Heading from 'heading.svelte';
import Code from 'code.svelte';
</script>
<!-- ✓ GOOD -->
<!-- [ 'error', { disallow: [ 'h1', 'code' ] } ] -->
<div />
<Heading type={1}>H1</Heading>
<Code>code</Code>
<!-- ✗ BAD -->
<h1>H1</h1>
<code>code</code>
Additional comments
No response
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needednew rule