Skip to content

languages: Support more JSON configuration files#50800

Merged
yeskunall merged 3 commits intozed-industries:mainfrom
rodrii-dp:patch-1
Mar 18, 2026
Merged

languages: Support more JSON configuration files#50800
yeskunall merged 3 commits intozed-industries:mainfrom
rodrii-dp:patch-1

Conversation

@rodrii-dp
Copy link
Copy Markdown
Contributor

@rodrii-dp rodrii-dp commented Mar 5, 2026

Several widely used configuration files are JSON but have no .json extension,
such as .babelrc or .eslintrc.

Editors like VS Code detect these as JSON automatically, but Zed currently
treats them as plain text.

This change adds common JSON config suffixes so they get proper JSON syntax
highlighting.

Added:

Before you mark this PR as ready for review, make sure that you have:

  • Added a solid test coverage and/or screenshots from doing manual testing
  • Done a self-review taking into account security and performance aspects
  • Aligned any UI changes with the UI checklist

Release Notes:

  • Support more JSON configuration files

@cla-bot
Copy link
Copy Markdown

cla-bot bot commented Mar 5, 2026

We require contributors to sign our Contributor License Agreement, and we don't have @rodrii-dp on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@zed-community-bot zed-community-bot bot added the first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions label Mar 5, 2026
@rodrii-dp
Copy link
Copy Markdown
Contributor Author

@cla-bot check

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Mar 5, 2026
@cla-bot
Copy link
Copy Markdown

cla-bot bot commented Mar 5, 2026

The cla-bot has been summoned, and re-checked this pull request!

@yeskunall yeskunall changed the title Add more .json extensions languages: Support more JSON configuration files Mar 12, 2026
@yeskunall
Copy link
Copy Markdown
Member

One thing to note for others coming into this later -- ESLint has deprecated the .eslintrc.* style in favor of the newer eslint.config.* “flat config” (Cosmicconfig) files. But I imagine a lot of folks are yet to migrate to ESLint v9+, so it makes sense to still support this for the time-being.

@yeskunall
Copy link
Copy Markdown
Member

@rodrii-dp thanks for this nice QoL addition, much appreciated! -- and congrats on your first contribution to Zed! 💖

@yeskunall yeskunall enabled auto-merge (squash) March 18, 2026 15:41
@yeskunall yeskunall merged commit 84d70ce into zed-industries:main Mar 18, 2026
32 checks passed
AmaanBilwar pushed a commit to AmaanBilwar/zed that referenced this pull request Mar 18, 2026
Several widely used configuration files are JSON but have no `.json`
extension,
such as `.babelrc` or `.eslintrc`.

Editors like VS Code detect these as JSON automatically, but Zed
currently
treats them as plain text.

This change adds common JSON config suffixes so they get proper JSON
syntax
highlighting.

Added:
- [`.babelrc`](https://babeljs.io/docs/config-files)
-
[`.eslintrc`](https://archive.eslint.org/docs/user-guide/configuring/configuration-files)
- [`.stylelintrc`](https://stylelint.io/user-guide/configure/)
- [`.swcrc`](swc-project/swc#4236)

Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [ ] Done a self-review taking into account security and performance
aspects
- [ ] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- Support more JSON configuration files
AmaanBilwar pushed a commit to AmaanBilwar/zed that referenced this pull request Mar 20, 2026
Several widely used configuration files are JSON but have no `.json`
extension,
such as `.babelrc` or `.eslintrc`.

Editors like VS Code detect these as JSON automatically, but Zed
currently
treats them as plain text.

This change adds common JSON config suffixes so they get proper JSON
syntax
highlighting.

Added:
- [`.babelrc`](https://babeljs.io/docs/config-files)
-
[`.eslintrc`](https://archive.eslint.org/docs/user-guide/configuring/configuration-files)
- [`.stylelintrc`](https://stylelint.io/user-guide/configure/)
- [`.swcrc`](swc-project/swc#4236)

Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [ ] Done a self-review taking into account security and performance
aspects
- [ ] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- Support more JSON configuration files
toshmukhamedov pushed a commit to toshmukhamedov/zed that referenced this pull request Mar 20, 2026
Several widely used configuration files are JSON but have no `.json`
extension,
such as `.babelrc` or `.eslintrc`.

Editors like VS Code detect these as JSON automatically, but Zed
currently
treats them as plain text.

This change adds common JSON config suffixes so they get proper JSON
syntax
highlighting.

Added:
- [`.babelrc`](https://babeljs.io/docs/config-files)
-
[`.eslintrc`](https://archive.eslint.org/docs/user-guide/configuring/configuration-files)
- [`.stylelintrc`](https://stylelint.io/user-guide/configure/)
- [`.swcrc`](swc-project/swc#4236)

Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [ ] Done a self-review taking into account security and performance
aspects
- [ ] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- Support more JSON configuration files
AmaanBilwar pushed a commit to AmaanBilwar/zed that referenced this pull request Mar 23, 2026
Several widely used configuration files are JSON but have no `.json`
extension,
such as `.babelrc` or `.eslintrc`.

Editors like VS Code detect these as JSON automatically, but Zed
currently
treats them as plain text.

This change adds common JSON config suffixes so they get proper JSON
syntax
highlighting.

Added:
- [`.babelrc`](https://babeljs.io/docs/config-files)
-
[`.eslintrc`](https://archive.eslint.org/docs/user-guide/configuring/configuration-files)
- [`.stylelintrc`](https://stylelint.io/user-guide/configure/)
- [`.swcrc`](swc-project/swc#4236)

Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [ ] Done a self-review taking into account security and performance
aspects
- [ ] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- Support more JSON configuration files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants