-
-
Notifications
You must be signed in to change notification settings - Fork 832
Labels
A-formatterArea - FormatterArea - Formatter
Description
I want to strictly sort my imports by type and defining where to put a newline between.
My json .oxfmtrc.json looks like this:
When I use newslinesBetweeen: true and create subgroups like groups: [[/* all values */], [/* all types*/]], the subgroups order is no longer respected, and all value imports are getting sort alphabetical
possible solution
perfectionist ESLint plugin has a newlinesBetween object which can be passed into groups.
oxfmt does not parse it:
Failed to parse configuration.
Failed to deserialize Oxfmtrc: groups must be an array of strings or arrays of strings
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-formatterArea - FormatterArea - Formatter
{ "experimentalSortImports": { "newlinesBetween": false, "groups": [ "value-builtin", "value-internal", "value-external", "value-parent", "value-sibling", "value-index", // { "newlinesBetween": 1 }, "type-internal", "type-import", "type-parent", "type-sibling", "type-index", "ts-equals-import", // { "newlinesBetween": 1 }, "unknown", ], }, }