Skip to content

oxfmt: --migrate prettier #15849

@Boshen

Description

@Boshen

Call prettier and get its config, then pick out the options we use or differ, then save to .oxfmtrc.jsonc

Migration

  • If printWidth specified, use it as-is.
    • Otherwise, set printWidth: 80 for prettier's default
  • Warn or comment out not supported format options like experimentalXxx
  • Warn meta-transform plugins may not be applied?
  • Anything else?

Consideration

  • First, we need to understand prettier API for config resolution
    • IIRC, prettier.resolveConfig() requires file path, because their config is resolved by each target file
    • In that case, which file path to be targeted?
    • We do not support nested config, always target root(cwd) config?

Metadata

Metadata

Assignees

Labels

Priority

None yet

Start date

None yet

Target date

None yet

Effort

None yet

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions