-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: import sorting for test folder and e2e folder #10190
Conversation
|
import { defineConfig } from 'astro/config'; | ||
import preact from '@astrojs/preact' | ||
import { defineConfig } from 'astro/config'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the only slightly odd part of the formatting is that defineConfig
is now below, but I'm not sure if it's feasible to make a rule to fix this. I'm not too bummed by it but bringing this up in case others might think the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. Here's the algorithm: https://biomejs.dev/analyzer/#how-imports-are-sorted in case others want to read it.
Bjorn, what would you expect from the import sorting, other than being the same as TypeScript?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the sorting algorithm is fine, but if there's an option to tweak certain orderings, I think that's a great bonus.
e.g. https://github.com/IanVS/prettier-plugin-sort-imports?tab=readme-ov-file#1-put-specific-dependencies-at-the-top. I used to use this prettier plugin and it has a few options to configure the ordering.
Changes
This PR applies import sorting for the
test
folders and thee2e
folders.I will make a later PR to ignore the commit from git.
Testing
Current CI should pass
Docs