-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: replace eslint with biomejs (#2189)
**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: - 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 vs Eslint - 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/
- Loading branch information
Showing
304 changed files
with
1,861 additions
and
5,503 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@digdir/designsystemet-react': patch | ||
'@digdir/designsystemet': patch | ||
--- | ||
|
||
Changed linter and formatter from eslint to biomejs |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Checks | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
paths: | ||
- 'packages/**' | ||
- 'apps/**' | ||
- 'biome.jsonc' | ||
jobs: | ||
checks: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/gh-setup | ||
- name: Biome CI | ||
run: yarn biome ci . | ||
- name: Lint CSS | ||
run: yarn lint-style | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.