Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Each blocks without item produce parsing error #953

Closed
2 tasks done
kklemon opened this issue Dec 13, 2024 · 1 comment
Closed
2 tasks done

Each blocks without item produce parsing error #953

kklemon opened this issue Dec 13, 2024 · 1 comment

Comments

@kklemon
Copy link

kklemon commented Dec 13, 2024

Before You File a Bug Report Please Confirm You Have Done The Following...

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.

What version of ESLint are you using?

v9.16.0

What version of eslint-plugin-svelte are you using?

2.46.1

What did you do?

Attempted to lint a svelte file containing an each block without item.

What did you expect to happen?

ESLint should be capable of parsing and processing a each block without item as it is valid syntax and also a feature explicitly mentioned in the documentation.

What actually happened?

ESLint parsing error:

./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

Link to GitHub Repo with Minimal Reproducible Example

https://github.com/kklemon/svelte-eslint-bug

Additional comments

No response

@baseballyama
Copy link
Member

Fixed by #956.

Slartibartfass2 added a commit to SE-UUlm/snowballr-frontend that referenced this issue Jan 22, 2025
In version 2.46.1, which we previously used, eslint couldn't handle svelte each blocks without 'as'.
We use on of these blocks on the project members settings page (src/routes/project/[projectId]/settings/members/+page.svelte):
```svelte
{#each { length: numberOfSkeletons }, i}
    <ProjectMemberListEntrySkeleton />
    {#if i < numberOfSkeletons - 1}
        <Separator />
    {/if}
{/each}
```
This was reported in sveltejs/eslint-plugin-svelte#953 and fixed in version 3.0.0-next.5.
Now eslint works again with our codebase.
Slartibartfass2 added a commit to SE-UUlm/snowballr-frontend that referenced this issue Jan 23, 2025
In version 2.46.1, which we previously used, eslint couldn't handle svelte each blocks without 'as'.
We use on of these blocks on the project members settings page (src/routes/project/[projectId]/settings/members/+page.svelte):
```svelte
{#each { length: numberOfSkeletons }, i}
    <ProjectMemberListEntrySkeleton />
    {#if i < numberOfSkeletons - 1}
        <Separator />
    {/if}
{/each}
```
This was reported in sveltejs/eslint-plugin-svelte#953 and fixed in version 3.0.0-next.5.
Now eslint works again with our codebase.
Slartibartfass2 added a commit to SE-UUlm/snowballr-frontend that referenced this issue Feb 1, 2025
In version 2.46.1, which we previously used, eslint couldn't handle svelte each blocks without 'as'.
We use on of these blocks on the project members settings page (src/routes/project/[projectId]/settings/members/+page.svelte):
```svelte
{#each { length: numberOfSkeletons }, i}
    <ProjectMemberListEntrySkeleton />
    {#if i < numberOfSkeletons - 1}
        <Separator />
    {/if}
{/each}
```
This was reported in sveltejs/eslint-plugin-svelte#953 and fixed in version 3.0.0-next.5.
Now eslint works again with our codebase.
Slartibartfass2 added a commit to SE-UUlm/snowballr-frontend that referenced this issue Feb 2, 2025
In version 2.46.1, which we previously used, eslint couldn't handle svelte each blocks without 'as'.
We use on of these blocks on the project members settings page (src/routes/project/[projectId]/settings/members/+page.svelte):
```svelte
{#each { length: numberOfSkeletons }, i}
    <ProjectMemberListEntrySkeleton />
    {#if i < numberOfSkeletons - 1}
        <Separator />
    {/if}
{/each}
```
This was reported in sveltejs/eslint-plugin-svelte#953 and fixed in version 3.0.0-next.5.
Now eslint works again with our codebase.
Slartibartfass2 added a commit to SE-UUlm/snowballr-frontend that referenced this issue Feb 4, 2025
In version 2.46.1, which we previously used, eslint couldn't handle svelte each blocks without 'as'.
We use on of these blocks on the project members settings page (src/routes/project/[projectId]/settings/members/+page.svelte):
```svelte
{#each { length: numberOfSkeletons }, i}
    <ProjectMemberListEntrySkeleton />
    {#if i < numberOfSkeletons - 1}
        <Separator />
    {/if}
{/each}
```
This was reported in sveltejs/eslint-plugin-svelte#953 and fixed in version 3.0.0-next.5.
Now eslint works again with our codebase.
Slartibartfass2 added a commit to SE-UUlm/snowballr-frontend that referenced this issue Feb 8, 2025
In version 2.46.1, which we previously used, eslint couldn't handle svelte each blocks without 'as'.
We use on of these blocks on the project members settings page (src/routes/project/[projectId]/settings/members/+page.svelte):
```svelte
{#each { length: numberOfSkeletons }, i}
    <ProjectMemberListEntrySkeleton />
    {#if i < numberOfSkeletons - 1}
        <Separator />
    {/if}
{/each}
```
This was reported in sveltejs/eslint-plugin-svelte#953 and fixed in version 3.0.0-next.5.
Now eslint works again with our codebase.
Slartibartfass2 added a commit to SE-UUlm/snowballr-frontend that referenced this issue Feb 8, 2025
In version 2.46.1, which we previously used, eslint couldn't handle svelte each blocks without 'as'.
We use on of these blocks on the project members settings page (src/routes/project/[projectId]/settings/members/+page.svelte):
```svelte
{#each { length: numberOfSkeletons }, i}
    <ProjectMemberListEntrySkeleton />
    {#if i < numberOfSkeletons - 1}
        <Separator />
    {/if}
{/each}
```
This was reported in sveltejs/eslint-plugin-svelte#953 and fixed in version 3.0.0-next.5.
Now eslint works again with our codebase.
Slartibartfass2 added a commit to SE-UUlm/snowballr-frontend that referenced this issue Feb 8, 2025
In version 2.46.1, which we previously used, eslint couldn't handle svelte each blocks without 'as'.
We use on of these blocks on the project members settings page (src/routes/project/[projectId]/settings/members/+page.svelte):
```svelte
{#each { length: numberOfSkeletons }, i}
    <ProjectMemberListEntrySkeleton />
    {#if i < numberOfSkeletons - 1}
        <Separator />
    {/if}
{/each}
```
This was reported in sveltejs/eslint-plugin-svelte#953 and fixed in version 3.0.0-next.5.
Now eslint works again with our codebase.
Slartibartfass2 added a commit to SE-UUlm/snowballr-frontend that referenced this issue Feb 18, 2025
In version 2.46.1, which we previously used, eslint couldn't handle svelte each blocks without 'as'.
We use on of these blocks on the project members settings page (src/routes/project/[projectId]/settings/members/+page.svelte):
```svelte
{#each { length: numberOfSkeletons }, i}
    <ProjectMemberListEntrySkeleton />
    {#if i < numberOfSkeletons - 1}
        <Separator />
    {/if}
{/each}
```
This was reported in sveltejs/eslint-plugin-svelte#953 and fixed in version 3.0.0-next.5.
Now eslint works again with our codebase.
Slartibartfass2 added a commit to SE-UUlm/snowballr-frontend that referenced this issue Feb 18, 2025
In version 2.46.1, which we previously used, eslint couldn't handle svelte each blocks without 'as'.
We use on of these blocks on the project members settings page (src/routes/project/[projectId]/settings/members/+page.svelte):
```svelte
{#each { length: numberOfSkeletons }, i}
    <ProjectMemberListEntrySkeleton />
    {#if i < numberOfSkeletons - 1}
        <Separator />
    {/if}
{/each}
```
This was reported in sveltejs/eslint-plugin-svelte#953 and fixed in version 3.0.0-next.5.
Now eslint works again with our codebase.
Slartibartfass2 added a commit to SE-UUlm/snowballr-frontend that referenced this issue Feb 18, 2025
In version 2.46.1, which we previously used, eslint couldn't handle svelte each blocks without 'as'.
We use on of these blocks on the project members settings page (src/routes/project/[projectId]/settings/members/+page.svelte):
```svelte
{#each { length: numberOfSkeletons }, i}
    <ProjectMemberListEntrySkeleton />
    {#if i < numberOfSkeletons - 1}
        <Separator />
    {/if}
{/each}
```
This was reported in sveltejs/eslint-plugin-svelte#953 and fixed in version 3.0.0-next.5.
Now eslint works again with our codebase.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants