Auto sort frontend imports #3542
Labels
help wanted
Community contributors can implement this
ready
Ready for implementation
type: maintenance
Refactoring and technical debt payoff
work: frontend
Related to frontend code in the mathesar_ui directory
Milestone
Current behavior
Desired behavior
*.ts
files and*.svelte
files.prettier --write .
(as is already defined in ourpackage.json
file). As such, it would be wise to first look for Prettier plugins that are able to sort imports.Example
Here's what TransformationsPane.svelte looks like right now...
In VS Code, I can run the action "Organize Imports" and I get this:
That's a nice improvement. It sorted the import statements and it sorted the named imports within statements.
Additionally, I have a slight preference for automatically grouping imports like this if possible:
Here, the external packages are listed first, then an empty line, then the aliases, then an empty line, then the rest.
If it's possible to automatically transform the entire import area into this grouped style, that would be awesome. But if that's not possible, it's okay.
Related
The text was updated successfully, but these errors were encountered: