Skip to content

Add .vscode/settings.json to .gitignore - #79106

Closed
manzoorwanijk wants to merge 1 commit into
trunkfrom
add/gitignore-vscode-settings
Closed

manzoorwanijk wants to merge 1 commit into
trunkfrom
add/gitignore-vscode-settings

Conversation

@manzoorwanijk

Copy link
Copy Markdown
Member

What?

See #77913

Adds /.vscode/settings.json to .gitignore.

Why?

#77913 proposes a managed VS Code workspace config, but it still needs consensus before it can move forward. In the meantime, contributors who keep personal settings in .vscode/settings.json risk accidentally committing them, since the file is currently untracked but not ignored. Ignoring it keeps personal editor settings out of accidental commits without taking a position on the managed-config proposal.

How?

Adds a /.vscode/settings.json entry to the "Local overrides" section of .gitignore. The leading slash scopes the rule to the repository root, and only settings.json is ignored so that tracked files like .vscode/launch-example.json remain unaffected.

Testing Instructions

  1. Create a .vscode/settings.json file at the repository root with any content.
  2. Run git status and confirm the file does not show up as untracked.
  3. Run git status --ignored -- .vscode and confirm .vscode/settings.json is listed as ignored.
  4. Confirm .vscode/launch-example.json is still tracked: git ls-files .vscode/.

Use of AI Tools

This PR was created with the assistance of Claude Code; the change and description were reviewed by the author.

@github-actions

github-actions Bot commented Jun 11, 2026 •

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: manzoorwanijk <manzoorwanijk@git.wordpress.org>
Co-authored-by: aduth <aduth@git.wordpress.org>
Co-authored-by: desrosj <desrosj@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions

Copy link
Copy Markdown

Warning: Type of PR label mismatch

To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.

  • Required label: Any label starting with [Type].
  • Labels found: .

Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task.

@manzoorwanijk manzoorwanijk added the [Type] Task Issues or PRs that have been broken down into an individual action to take label Jun 11, 2026
@github-actions

Copy link
Copy Markdown

Flaky tests detected in f17eef7.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/27331990972
📝 Reported issues:

@aduth

aduth commented Jun 11, 2026

Copy link
Copy Markdown
Member

I found some prior discussion about .vscode and IDE-specific gitignores more generally in #1783 (comment) which still feels relevant here. I'm sympathetic to the point raised there, since user-level gitignores are a solution and baking in awareness and configuration for specific IDEs is a can of worms (i.e. how do we decide which IDEs to support or not support?). That said, the argument doesn't hold a whole lot of merit when we already have a .vscode directory with a launch example configuration 🙃 And user-level gitignores are enough of a hurdle or commonly overlooked enough that maybe it helps developer experience to avoid a common pain point of working in this project with an editor used by 76% of all survey-responding developers.

@manzoorwanijk

Copy link
Copy Markdown
Member Author

the argument doesn't hold a whole lot of merit when we already have a .vscode directory with a launch example configuration

Yes, I usually have .vscode gitignored at user-level but then here it is tracked with that configuration. This was primarily the reason to add that managed config in the other PR and then this one to just let me do it my way 😄

@desrosj

desrosj commented Jun 12, 2026 •

Copy link
Copy Markdown
Member

I think that I am personally a -1 at the moment for this, mainly for the reasons already stated (historical precedence, and the can of worms that is deciding which editors to add to .gitignore).

the argument doesn't hold a whole lot of merit when we already have a .vscode directory with a launch example configuration

As a counter argument, I think that we should consider moving this launch example to the developer documentation instead of remaining in source code. Though, I don't feel strongly, I think we end up with the same situation as the .gitignore: which editors do we include examples of in the source code?

@manzoorwanijk

Copy link
Copy Markdown
Member Author

Closing in favor of #77913

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

Labels

[Type] Task Issues or PRs that have been broken down into an individual action to take

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants