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?
- Or just change default to
auto
TL;DR: How do we enable embedded-language-formatting in non-JS files but keep it disabled in JS files?
Currently, the
embeddedLanguageFormattingoption isoffby 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:.prettierrcis formatted with trailing comma #16673I think we should change the default to
autonow.But I also prefer to keep
offfor JS/TS files for a while.So..., how about
experimentalJsEmbeddedLanguageFormattingto disable embedded formatting only for JS/TS files?embeddedLanguageFormatting: auto | off | disble-oxc?auto