Skip to content

fix(starter): fix up vscode settings merge 🐼 #7858

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

gioboa
Copy link
Member

@gioboa gioboa commented Aug 23, 2025

Close #5280

base/.vscode/settings.json is a JSON5 file, we need to use json5 lib to parse it.
Right now we have an error because in the Qwik CLI, we're trying to parse that file with JSON.parse; this will fallback to the catch branch and overwrite the entire file.

@gioboa gioboa requested a review from a team as a code owner August 23, 2025 21:34
Copy link

changeset-bot bot commented Aug 23, 2025

🦋 Changeset detected

Latest commit: 6890daf

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

This PR includes changesets to release 4 packages
Name Type
create-qwik Patch
@builder.io/qwik Patch
@builder.io/qwik-city Patch
eslint-plugin-qwik 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

@gioboa gioboa changed the title fix(starter): clean base/.vscode/settings.json to preserve a valid JSON format fix(starter): clean base/.vscode/settings.json to have a valid JSON format 🐠 Aug 23, 2025
Copy link

pkg-pr-new bot commented Aug 23, 2025

Open in StackBlitz

npm i https://pkg.pr.new/@builder.io/qwik@7858
npm i https://pkg.pr.new/@builder.io/qwik-city@7858
npm i https://pkg.pr.new/eslint-plugin-qwik@7858
npm i https://pkg.pr.new/create-qwik@7858

commit: 6890daf

Copy link
Contributor

github-actions bot commented Aug 23, 2025

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
qwik-docs ✅ Ready (View Log) Visit Preview 6890daf

Copy link
Member

@wmertens wmertens left a comment

Choose a reason for hiding this comment

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

Actually, the bug is on our side. The settings file is JSON5, meaning it supports comments, and we should parse it as such. We can use https://www.npmjs.com/package/json5-writer to handle json files in a way that preserves comments.

@gioboa gioboa changed the title fix(starter): clean base/.vscode/settings.json to have a valid JSON format 🐠 fix(starter): fix up vscode settings merge 🐼 Aug 24, 2025
@gioboa gioboa force-pushed the fix/5280 branch 2 times, most recently from 8e8bfe2 to c5a53ec Compare August 24, 2025 14:33
@gioboa
Copy link
Member Author

gioboa commented Aug 24, 2025

Actually, the bug is on our side. The settings file is JSON5, meaning it supports comments, and we should parse it as such. We can use https://www.npmjs.com/package/json5-writer to handle json files in a way that preserves comments.

Fixed

Copy link
Member Author

@gioboa gioboa left a comment

Choose a reason for hiding this comment

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

JSON5.parse is working fine but it's stripping the comments 🤔
On the other hand it is solving the main issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[✨] Tailwind CSS Integration Overwrites .vscode/settings.json
2 participants