Skip to content

kklemon/svelte-eslint-bug

Repository files navigation

svelte-eslint-bug

src/routes/+page.svelte contains a each block without an item:

{#each { length: 5}}
    <p>Item</p>
{/each}

This is valid syntax and also a feature explicitly mentioned in the documentation.

However, when running eslint, the following parsing error will be produced:

./svelte-eslint-bug/src/routes/+page.svelte
  0:9  error  Parsing error: null is not an object (evaluating 'node.leadingComments')

✖ 1 problem (1 error, 0 warnings)

error: "eslint" exited with code 1

Changing the each block to {#each { length: 5} as _} will resolve the problem.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published