pageClass | sidebarDepth | title | description | since |
---|---|---|---|---|
rule-details |
0 |
svelte/valid-style-parse |
require valid style element parsing |
v3.0.0 |
require valid style element parsing
This rule reports issues with parsing of the <style>
element by the svelte-eslint-parser.
<script>
/* eslint svelte/valid-style-parse: ["error"] */
</script>
<!-- ✓ GOOD -->
<style>
.class {
font-weight: bold;
}
</style>
<script>
/* eslint svelte/valid-style-parse: ["error"] */
</script>
<!-- ✓ GOOD -->
<style lang="scss">
.class {
font-weight: bold;
}
</style>
<script>
/* eslint svelte/valid-style-parse: ["error"] */
</script>
<!-- ✗ BAD -->
<style>
.class
font-weight: bold;
</style>
<script>
/* eslint svelte/valid-style-parse: ["error"] */
</script>
<!-- ✗ BAD -->
<style lang="unknown">
.class {
font-weight: bold;
}
</style>
Nothing.
This rule was introduced in eslint-plugin-svelte v3.0.0