-
-
Notifications
You must be signed in to change notification settings - Fork 950
oxfmt: --migrate prettier #15849
Copy link
Copy link
Description
Call prettier and get its config, then pick out the options we use or differ, then save to .oxfmtrc.jsonc
Migration
- If
printWidthspecified, use it as-is.- Otherwise, set
printWidth: 80for prettier's default
- Otherwise, set
- 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
prettierAPI 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?
- IIRC,
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-formatterArea - FormatterArea - Formatter
Type
Fields
Give feedbackPriority
None yet
Start date
None yet
Target date
None yet
Effort
None yet