Skip to content

Svelte 5: Parsing Error with Snippets #686

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

Closed
2 tasks done
abdel-17 opened this issue Feb 21, 2024 · 0 comments · Fixed by #687
Closed
2 tasks done

Svelte 5: Parsing Error with Snippets #686

abdel-17 opened this issue Feb 21, 2024 · 0 comments · Fixed by #687

Comments

@abdel-17
Copy link

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?

8.56.0

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

2.63.0-next.5

What did you do?

ESlint fails to parse snippets whose arguments are function calls.

<script lang="ts">
	import type { Snippet } from "svelte";

	let { foo } = $props<{ foo: Snippet<[string]> }>();

	function bar() {
		return "baz";
	}
</script>

{@render foo(bar())}

What did you expect to happen?

Parsing should not fail.

Screen.Recording.2024-02-21.at.12.54.57.PM.mov

What actually happened?

  13:11  error  Parsing error: ')' expected

✖ 1 problem (1 error, 0 warnings)

Link to GitHub Repo with Minimal Reproducible Example

https://github.com/abdel-17/svelte-eslint-bug-reproduction

Additional comments

No response

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

Successfully merging a pull request may close this issue.

1 participant