Skip to content

no-multiple-emty-lines when iterating a store with each block #196

@mckravchyk

Description

@mckravchyk
<!-- Error: More than 1 blank not allowed (one line below) -->
<script lang="ts"> 
  import { readable } from 'svelte/store';
  
  const ids = readable([]);
</script>
  
  <div class="Component">
    {#each $ids as id (id)}
      <div>{id}</div>
    {/each}
  </div>

I have started noticing it after upgrading from ESLint 7 to 8 (which followed the upgrade of this plugin and airbnb-base rules that I use).

So far I have only noticed it to occur when using each block and iterating a store ($ syntax) specifically.

I could not find a workaround except using 0 indentation for the affected files - putting a comment right after <script> will fix this, but it makes the indentation start of the indent rule in the script tag 0, rather than say, 2 spaces which is my preference.

#41 is a similar issue, though here only one script tag is at play.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions