Skip to content

Conversation

@Boshen
Copy link
Member

@Boshen Boshen commented Dec 10, 2025

closes #15850

@leaysgur handing this over to you, because we need a bigger change to merge the options.

https://github.com/prettier/prettier/blob/1cc636785661d9c0b53a31845348ed0d5456211b/src/config/resolve-config.js#L74-L86

If you look at the TODO line, we need to create default options, then override it by editorconfig, then override by oxfmtrc.json

.editorconfig defines overrides already

[*]
charset = utf-8
trim_trailing_whitespace = true
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4

[*.{js,mjs,cjs,jsx,ts,tsx,json,yml}]
indent_size = 2

So each path receives a different config. I think you may want to plan ahead for oxfmtrc override, which should behave exactly the same as editorconfig.

@github-actions github-actions bot added A-cli Area - CLI A-formatter Area - Formatter C-enhancement Category - New feature or request labels Dec 10, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Dec 10, 2025

CodSpeed Performance Report

Merging #16680 will not alter performance

Comparing 12-10-feat_oxfmt_.editorconfig_support (fcc8dd8) with main (8babdf9)1

Summary

✅ 42 untouched
⏩ 3 skipped2

Footnotes

  1. No successful run was found on main (0a3bb7b) during the generation of this report, so 8babdf9 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

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

Labels

A-cli Area - CLI A-formatter Area - Formatter C-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

oxfmt: respect .editorconfig

3 participants