-
Notifications
You must be signed in to change notification settings - Fork 159
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: sort imports #802
chore: sort imports #802
Conversation
statements: 95.34, | ||
statements: 95.33, | ||
branches: 97.7, | ||
functions: 90.5, | ||
lines: 95.34, | ||
lines: 95.33, |
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.
Decreased thresholds for coverage to pass
Could it be possible if we run ESLint after Biome? and use that as a way to organize imports with the settings from Build Onchain Apps? Also, I kind of like keep Lint and Format split, so when they fails folks know what it did failed. |
This reverts commit e3ad2bc.
Added back github workflows. I just had a look at eslint and didn't managed to make it work without big tradeoffs. BOAT uses a config file that is now deprecated by eslint in favor of "flat config files" (see there https://eslint.org/docs/latest/use/configure/configuration-files) and The native rule sort-imports works but doesn't support automatic fix fully. Running with |
This reverts commit 38dd6a9.
Hey @roushou , I end up committing this with separate PRs. Thank you again for starting this thread, it was really useful. |
This PR makes use of the organize import feature of Biome by:
biome check --write .
in the scripts.ci:lint
andci:format
scripts to a singleci
script that uses all ofbiome ci
capabilities.format
andlint
github workflows to a singlelint
workflowbiome check
has already been run on the codebase.Regarding #785 (comment) @Zizzamia. There are some limitations compared to
prettier-plugin-sort-imports
andeslint-plugin-import/order
which allow to configure sorting rules in the config. This is currently not possible with Biome. There's an RFC open biomejs/biome#3015.For now, grouping can be done by manually adding blank lines around imports https://biomejs.dev/analyzer/import-sorting/#grouped-imports. Imports order is determined by "how far" imported modules are, see https://biomejs.dev/analyzer/import-sorting/#how-imports-are-sorted.