Skip to content

fix(vscode): handle ESM Prettier config - #1344

Open
efegokdemir wants to merge 1 commit into
Shopify:mainfrom
efegokdemir:efe/fix-vscode-prettier-config
Open

efegokdemir wants to merge 1 commit into
Shopify:mainfrom
efegokdemir:efe/fix-vscode-prettier-config

Conversation

@efegokdemir

Copy link
Copy Markdown

What are you adding in this PR?

Fixes #619. The VS Code extension now unwraps ESM Prettier config exports. If config resolution fails, formatting falls back to default options and shows one warning per workspace.

The formatter regression tests, package type-check and build, changed-file ESLint and Prettier checks passed. The package-wide lint still reports existing no-undef errors in untouched files.

What's next? Any followup issues?

None.

What did you learn?

Prettier can return an ESM config as a module namespace, so the extension needs to unwrap its default export before passing the options to the formatter.

Tophatting

Open a Liquid file in a workspace with an ESM prettier.config.js, run Format Document and confirm the configured options are applied. With a config that cannot be loaded, confirm formatting uses defaults and shows a warning.

  • I added screenshots of the changes (before and after the changes if applicable)

Before you deploy

Bug fixes

  • I included a patch bump changeset

@efegokdemir
efegokdemir requested a review from a team as a code owner October 18, 2026 08:54

This branch has not been deployed

No deployments
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.

prettier.config.js doesn't load in extension

1 participant