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

Parsing error '=>' expected when parsing typed snippets #872

Closed
2 tasks done
bradyisom opened this issue Oct 15, 2024 · 1 comment · Fixed by #874
Closed
2 tasks done

Parsing error '=>' expected when parsing typed snippets #872

bradyisom opened this issue Oct 15, 2024 · 1 comment · Fixed by #874

Comments

@bradyisom
Copy link

bradyisom commented Oct 15, 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?

9.12.0

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

2.44.1

What did you do?

<script lang="ts">
	function hello() {
		console.log('Hello');
	}
</script>

<h1>Welcome to SvelteKit</h1>
<p>Visit <a href="https://kit.svelte.dev">kit.svelte.dev</a> to read the documentation</p>

{@render editor_button({ onclick: hello })}

<!-- prettier-ignore -->
{#snippet editor_button(foo: {
    onclick: () => void,
})}
  <button on:click={foo.onclick}>Click me</button>
{/snippet}

What did you expect to happen?

I expect no errors

What actually happened?

Received this error:

  12:15  error  Parsing error: '=>' expected

Link to GitHub Repo with Minimal Reproducible Example

https://github.com/bradyisom/eslint-typed-snippets

Additional comments

To repro with GitHub repo, yarn install and yarn lint

@bradyisom
Copy link
Author

Perfect! Thank you for the quick response. I can verify that this bug is resolved with the latest version.

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