Skip to content

oxfmt: Make .oxfmtrc.jsonc the default instead of .json? #14575

@leaysgur

Description

@leaysgur

Suggestion from:

Since this is a new tool, In my opinion, it'd be better to default to .oxfmtrc.jsonc, which forces comment support, and provides better ide support (else you get your ide complaining about comments in .json files (which aren't technichally supported).
#14398 (comment)

Backgroud:

  • oxfmt auto search config file if not specified by -c or --config
  • In this case, .oxfmtrc.json is the default (not .jsonc)

Personally, I agree with this suggestion.

(To be more precise, IMO, I'm open to even dropping comment support for .json files, but I tolerate it because of examples like tsconfig.json. 😶‍🌫️)

However, I also feel that the .jsonc extension has yet to gain widespread adoption.
(Even VSCode apparently has an association setting that lets you keep the .json extension while having it interpreted as .jsonc!)

Therefore, as a compromise, I'm considering reverting to the behavior implemented in the initial PR, which searching for both .json and .jsonc by default.

Or, just keep it as-is, only .json.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions