Skip to content

Conversation

@baseballyama
Copy link
Member

close: #1434

Copilot AI review requested due to automatic review settings December 4, 2025 07:35
@changeset-bot
Copy link

changeset-bot bot commented Dec 4, 2025

🦋 Changeset detected

Latest commit: a4f290b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
eslint-plugin-svelte Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Dec 4, 2025

Try the Instant Preview in Online Playground

ESLint Online Playground

Install the Instant Preview to Your Local

npm i https://pkg.pr.new/eslint-plugin-svelte@a4f290b

Published Instant Preview Packages:

View Commit

Copilot finished reviewing on behalf of baseballyama December 4, 2025 07:40
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for the experimental.async compiler option in Svelte 5, which allows top-level await in Svelte components. The fix ensures that when this option is configured in the eslint parser's svelteConfig, it's properly passed to the Svelte compiler during validation.

  • Extracts and passes the experimental.async compiler option from parser configuration to the Svelte compiler
  • Adds comprehensive test coverage for both valid (option enabled) and invalid (option disabled) scenarios
  • Follows existing patterns for selectively passing compiler options

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/eslint-plugin-svelte/src/shared/svelte-compile-warns/index.ts Extracts experimental.async from svelteConfig and passes it to compiler.compile()
packages/eslint-plugin-svelte/tests/fixtures/rules/valid-compile/valid/svelte-config-experimental-async/_config.cjs Test configuration enabling experimental.async option
packages/eslint-plugin-svelte/tests/fixtures/rules/valid-compile/valid/svelte-config-experimental-async/top-level-await-input.svelte Valid test case with top-level await when option is enabled
packages/eslint-plugin-svelte/tests/fixtures/rules/valid-compile/valid/svelte-config-experimental-async/top-level-await-requirements.json Specifies Svelte 5.0.0+ requirement for valid test
packages/eslint-plugin-svelte/tests/fixtures/rules/valid-compile/invalid/experimental-async-disabled/top-level-await-input.svelte Invalid test case with top-level await when option is disabled
packages/eslint-plugin-svelte/tests/fixtures/rules/valid-compile/invalid/experimental-async-disabled/top-level-await-errors.yaml Expected error output for invalid test case
packages/eslint-plugin-svelte/tests/fixtures/rules/valid-compile/invalid/experimental-async-disabled/top-level-await-requirements.json Specifies Svelte 5.0.0+ requirement for invalid test
.changeset/wild-steaks-invent.md Changeset entry documenting this fix as a patch release

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@ota-meshi ota-meshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ota-meshi ota-meshi merged commit 817b137 into main Dec 5, 2025
29 checks passed
@ota-meshi ota-meshi deleted the fix/async-svelte branch December 5, 2025 01:38
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 this pull request may close these issues.

cannot use await false warning even though experimental.async is turned on

3 participants