zed/crates/prettier
Matt Harrison 8589cbbf6b
Some checks are pending
Congratsbot / check-author (push) Waiting to run
Congratsbot / congrats (push) Blocked by required conditions
deploy_nightly_docs / deploy_docs (push) Waiting to run
run_tests / miri_scheduler (push) Blocked by required conditions
run_tests / doctests (push) Blocked by required conditions
run_tests / check_workspace_binaries (push) Blocked by required conditions
run_tests / build_visual_tests_binary (push) Blocked by required conditions
run_tests / check_wasm (push) Blocked by required conditions
run_tests / tests_pass (push) Blocked by required conditions
run_tests / orchestrate (push) Waiting to run
run_tests / check_style (push) Waiting to run
run_tests / clippy_windows (push) Blocked by required conditions
run_tests / clippy_linux (push) Blocked by required conditions
run_tests / extension_tests (push) Blocked by required conditions
run_tests / clippy_mac (push) Blocked by required conditions
run_tests / clippy_mac_x86_64 (push) Blocked by required conditions
run_tests / run_tests_windows (push) Blocked by required conditions
run_tests / run_tests_linux (push) Blocked by required conditions
run_tests / run_tests_mac (push) Blocked by required conditions
run_tests / check_dependencies (push) Blocked by required conditions
run_tests / check_docs (push) Blocked by required conditions
run_tests / check_licenses (push) Blocked by required conditions
run_tests / check_scripts (push) Blocked by required conditions
run_tests / check_postgres_and_protobuf_migrations (push) Blocked by required conditions
Allow Prettier to read the .editorconfig files of the project when formatting from within Zed (#59149)
allow Prettier to read the .editorconfig files of the project when
formatting from within zed.

Prettier's API requires passing the `{ editorconfig: true }` option to
read .editorconfig files. The prettier CLI uses this option by default
when running but the API does not.

API Option for this:
https://prettier.io/docs/api#prettierresolveconfigfileurlorpath--options

Code where the CLI of prettier defaults this to true to show this option
aligns with Prettier's defaults.

-
7e374c3cd0/src/cli/cli-options.evaluate.js (L162)
-
7e374c3cd0/src/cli/options/get-options-for-file.js (L72)

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [ ] Tests cover the new/changed behavior
  - No tests were found that covered running prettier directly.
- [x] Performance impact has been considered and is acceptable

Closes #10828

Release Notes:

- Allow Prettier to read the .editorconfig files of the project when
formatting from within zed.
2026-06-13 05:21:05 +00:00
..
src Allow Prettier to read the .editorconfig files of the project when formatting from within Zed (#59149) 2026-06-13 05:21:05 +00:00
Cargo.toml Remove workspace-hack (#40216) 2025-10-17 18:58:14 +00:00
LICENSE-GPL