Skip to content

oxfmt: Change to embeddedLanguageFormatting: "auto" by default aligning with Prettier #16763

Description

@leaysgur

TL;DR: How do we enable embedded-language-formatting in non-JS files but keep it disabled in JS files?


Currently, the embeddedLanguageFormatting option is off by default.

This is because our embedded formatting for JS/TS files is not fully implemented. See #15180.

But at the same time, we now support non-JS/TS files, and embedded formatting for them is handled by Prettier, so it should work.

Because of the default off, a few issues have already been reported:

I think we should change the default to auto now.
But I also prefer to keep off for JS/TS files for a while.

So..., how about

  • adding another flag experimentalJsEmbeddedLanguageFormatting to disable embedded formatting only for JS/TS files?
  • Or add our own variant on embeddedLanguageFormatting: auto | off | disble-oxc?
  • Or should we just disable the feature itself until we have finished with the JS/TS files?
    • I now tend to this
  • Or just change default to auto
    • incomplete but works

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

Priority

None yet

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions