pageClass | sidebarDepth | title | description |
---|---|---|---|
rule-details |
0 |
svelte/valid-style-parse |
require valid style element parsing |
require valid style element parsing
- ❗ This rule has not been released yet.
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.