Skip to content

Latest commit

 

History

History
78 lines (60 loc) · 1.45 KB

valid-style-parse.md

File metadata and controls

78 lines (60 loc) · 1.45 KB
pageClass sidebarDepth title description
rule-details
0
svelte/valid-style-parse
require valid style element parsing

svelte/valid-style-parse

require valid style element parsing

  • This rule has not been released yet.

📖 Rule Details

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>

🔧 Options

Nothing.

🔍 Implementation