Skip to content

Files

Latest commit

 

History

History
40 lines (27 loc) · 967 Bytes

spaced-html-comment.md

File metadata and controls

40 lines (27 loc) · 967 Bytes

Pattern: Inconsistent spacing after <!-- and before -->

Issue: -

Description

This rule will enforce consistency of spacing after the start of a comment <!-- and before the end of a comment -->.

<script>
  /* eslint svelte/spaced-html-comment: "error" */
</script>

<!-- ✓ GOOD -->

<!--✗ BAD-->

🔧 Options

{
  "svelte/spaced-html-comment": [
    "error",
    "always" // or "never"
  ]
}
  • "always" ... There must be at least one whitespace after <!-- and before -->.
  • "never" ... There should be no leading or trailing whitespace. There should be no whitespace following.

🚀 Version

This rule was introduced in eslint-plugin-svelte v0.0.1

🔍 Implementation