-
Notifications
You must be signed in to change notification settings - Fork 40
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: replace eslint with biomejs #2189
Conversation
🦋 Changeset detectedLatest commit: 268370d The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Preview deployments for this pull request: 📖 Storybook 🖥 Storefront See all deployments at https://dev.designsystemet.no |
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to next, this PR will be updated.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ `next` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `next`.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ # Releases ## @digdir/designsystemet@0.1.0-next.21 ### Patch Changes - chore: Fix rollup build warnings for react package ([#2187](#2187)) - chore: Replace eslint with biomejs ([#2189](#2189)) - fix: Export correct bin files ([`019e72314eff58e9ea575ab5dfb7b7eba6ddaa43`](019e723)) ## @digdir/designsystemet-react@1.0.0-next.15 ### Patch Changes - chore: Fix rollup build warnings for react package ([#2187](#2187)) - chore: Replace eslint with biomejs ([#2189](#2189)) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
**TLDR; Replace eslint and prettier (except css) for linting and formatting.** After doing some testing, debugging and fighting with getting eslint to work in #2175, I made this to test biomejs as a replacement. Either way we had to do big config changes for eslint 9.x so might aswell try biomejs. In general a positive experience having tested biomejs. - Linting is now done for the whole repo, except "ignores". - Seperated gh workflows. - Linting is now done in a separate workflow for the whole repo. - Building and testing the individual packages or apps i their own workflow. (will do more renames here after merging into `next`) - New recommended vscode extension for biomejs. - Biomejs lints, formats and sorts import order in <1s, while eslint 8.x uses >40s for only linting. - Linting when coding is also noticeably faster - Biomejs is still limited in what can be configured, but most of its current features set is good enough for our needs. - Biomejs is only 1 dependency, opposed to 11 dependencies from eslint - No more hassle upgrading dependencies hopefully - Biomejs lacks: - CSS formatting, ([but its being worked on](https://biomejs.dev/internals/language-support/)), so we are still using prettier for this. - Typed-linting? (i think) - No way of defining our own import order ([RFC](biomejs/biome#3015)) - No plugin support [but its planned](https://biomejs.dev/blog/roadmap-2024/) - Biomejs also has some new good linting rules we fixed - https://biomejs.dev/linter/rules/no-for-each/ - https://biomejs.dev/linter/rules/no-comma-operator/ - https://biomejs.dev/linter/rules/no-shadow-restricted-names/ - https://biomejs.dev/linter/rules/no-useless-else/ - https://biomejs.dev/linter/rules/no-assign-in-expressions/ - https://biomejs.dev/linter/rules/no-accumulating-spread/ - https://biomejs.dev/linter/rules/no-implicit-any-let/
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to next, this PR will be updated.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ `next` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `next`.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ # Releases ## @digdir/designsystemet@0.1.0-next.21 ### Patch Changes - chore: Fix rollup build warnings for react package ([#2187](#2187)) - chore: Replace eslint with biomejs ([#2189](#2189)) - fix: Export correct bin files ([`019e72314eff58e9ea575ab5dfb7b7eba6ddaa43`](019e723)) ## @digdir/designsystemet-react@1.0.0-next.15 ### Patch Changes - chore: Fix rollup build warnings for react package ([#2187](#2187)) - chore: Replace eslint with biomejs ([#2189](#2189)) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
TLDR; Replace eslint and prettier (except css) for linting and formatting.
After doing some testing, debugging and fighting with getting eslint to work in #2175, I made this to test biomejs as a replacement.
Either way we had to do big config changes for eslint 9.x so might aswell try biomejs.
In general a positive experience having tested biomejs.
Noticable changes:
next
)Biomejs vs Eslint