-
Notifications
You must be signed in to change notification settings - Fork 4
chore: add Biome for linting and formatting #18
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
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,5 @@ | ||
| { | ||
| "recommendations": [ | ||
| "biomejs.biome" | ||
| ] | ||
| } |
This file contains hidden or 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,24 @@ | ||||||||||||||||||
| { | ||||||||||||||||||
| "[typescript]": { | ||||||||||||||||||
| "editor.defaultFormatter": "biomejs.biome", | ||||||||||||||||||
| "editor.formatOnSave": true, | ||||||||||||||||||
| "editor.codeActionsOnSave": { | ||||||||||||||||||
| "quickfix.biome": "explicit", | ||||||||||||||||||
| "source.organizeImports.biome": "explicit" | ||||||||||||||||||
| } | ||||||||||||||||||
| }, | ||||||||||||||||||
| "[javascript]": { | ||||||||||||||||||
| "editor.defaultFormatter": "biomejs.biome", | ||||||||||||||||||
| "editor.formatOnSave": true, | ||||||||||||||||||
| "editor.codeActionsOnSave": { | ||||||||||||||||||
| "quickfix.biome": "explicit", | ||||||||||||||||||
| "source.organizeImports.biome": "explicit" | ||||||||||||||||||
| } | ||||||||||||||||||
|
Comment on lines
+13
to
+16
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar to the
Suggested change
|
||||||||||||||||||
| }, | ||||||||||||||||||
| "[json]": { | ||||||||||||||||||
| "editor.defaultFormatter": "biomejs.biome", | ||||||||||||||||||
| "editor.formatOnSave": true | ||||||||||||||||||
| }, | ||||||||||||||||||
| "editor.formatOnSave": true, | ||||||||||||||||||
| "editor.defaultFormatter": "biomejs.biome" | ||||||||||||||||||
| } | ||||||||||||||||||
This file contains hidden or 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,60 @@ | ||
| # Biome Quick Reference | ||
|
|
||
| ## Common Commands | ||
|
|
||
| ```bash | ||
| # Format and fix all issues (recommended for development) | ||
| pnpm format | ||
| # or | ||
| pnpm biome:check:write | ||
|
|
||
| # Check for issues without modifying (CI/pre-commit) | ||
| pnpm lint | ||
| # or | ||
| pnpm biome:check | ||
|
|
||
| # CI mode (strict, no writes, exits on error) | ||
| pnpm biome:ci | ||
|
|
||
| # Format only (no linting) | ||
| pnpm biome:format | ||
|
|
||
| # Check if files are formatted | ||
| pnpm biome:format:check | ||
| ``` | ||
|
|
||
| ## VS Code | ||
|
|
||
| - Install the `biomejs.biome` extension (recommended) | ||
| - Files auto-format on save | ||
| - Imports auto-organize on save | ||
| - Quick fixes applied automatically | ||
|
|
||
| ## File Locations | ||
|
|
||
| - **Configuration:** `biome.json` | ||
| - **VS Code settings:** `.vscode/settings.json` | ||
| - **Documentation:** `BIOME_SETUP.md`, `BIOME_SUMMARY.md` | ||
|
|
||
| ## Key Settings | ||
|
|
||
| - **Line width:** 100 characters | ||
| - **Quotes:** Single | ||
| - **Semicolons:** Always | ||
| - **Trailing commas:** ES5 (compatible with ES2018) | ||
| - **Indentation:** 2 spaces | ||
| - **Line endings:** LF (npm package standard) | ||
|
|
||
| ## Current Status | ||
|
|
||
| - **Version:** `@biomejs/biome@2.3.14` | ||
| - **Files:** 48 checked | ||
| - **Errors:** 2 (acceptable - legacy code) | ||
| - **Warnings:** 14 (acceptable - intentional `any` types) | ||
| - **Tests:** 221 passed | ||
|
|
||
| ## Help | ||
|
|
||
| For detailed documentation, see `BIOME_SETUP.md`. | ||
|
|
||
| For Biome official docs: https://biomejs.dev/ |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The
codeActionsOnSaveis set to"explicit", which means actions will only run when manually triggered, not automatically on save. This contradicts the documentation inBIOME_SETUP.mdwhich states that quick fixes and import organization happen automatically on save. To enable this behavior, you should change the value totrue.