chore: add Biome for linting and formatting#18
Conversation
Add production-ready Biome configuration for code quality and consistency. - Install @biomejs/biome@2.3.14 - Add biome.json with TypeScript/ES2018+CommonJS compatible settings - Configure 100-char line width, single quotes, semicolons - Enable all recommended lint rules with project-specific overrides - Add npm scripts: biome:check, biome:check:write, biome:format, lint, format - Set up VS Code integration (default formatter, format on save) - Format all source files (48 files processed) - Add comprehensive documentation (BIOME_SETUP.md, BIOME_SUMMARY.md, BIOME_QUICKREF.md) Reduces lint issues from 184 to 16 (all acceptable). All 221 tests pass. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Summary of ChangesHello @GhostTypes, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the project's code quality and developer experience by integrating Biome as a fast and unified tool for linting and formatting. The changes streamline the development workflow, enforce consistent code style, and ensure maintainability across the TypeScript codebase, all while maintaining full test coverage and compatibility with existing project constraints. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces Biome for linting and formatting, which is a great move towards a unified and fast toolchain. The configuration is comprehensive, and the inclusion of detailed documentation is much appreciated. The automatic formatting of all source files brings consistency to the codebase.
I've found a minor issue in the VS Code settings that contradicts the documented behavior for auto-fixing on save. My review comments include suggestions to align the configuration with the documentation. Overall, this is an excellent contribution to the project's developer experience.
| "editor.codeActionsOnSave": { | ||
| "quickfix.biome": "explicit", | ||
| "source.organizeImports.biome": "explicit" | ||
| } |
There was a problem hiding this comment.
The codeActionsOnSave is set to "explicit", which means actions will only run when manually triggered, not automatically on save. This contradicts the documentation in BIOME_SETUP.md which states that quick fixes and import organization happen automatically on save. To enable this behavior, you should change the value to true.
| "editor.codeActionsOnSave": { | |
| "quickfix.biome": "explicit", | |
| "source.organizeImports.biome": "explicit" | |
| } | |
| "editor.codeActionsOnSave": { | |
| "quickfix.biome": true, | |
| "source.organizeImports.biome": true | |
| } |
| "editor.codeActionsOnSave": { | ||
| "quickfix.biome": "explicit", | ||
| "source.organizeImports.biome": "explicit" | ||
| } |
There was a problem hiding this comment.
Similar to the [typescript] configuration, this should be set to true to enable automatic actions on save as described in the documentation. The current "explicit" value requires manual triggering.
| "editor.codeActionsOnSave": { | |
| "quickfix.biome": "explicit", | |
| "source.organizeImports.biome": "explicit" | |
| } | |
| "editor.codeActionsOnSave": { | |
| "quickfix.biome": true, | |
| "source.organizeImports.biome": true | |
| } |
Summary
This PR adds Biome as a fast, modern linter and formatter for the TypeScript codebase, replacing the need for ESLint/Prettier with a unified tool.
Changes
@biomejs/biome@2.3.14as dev dependencybiome.jsonconfigurationbiome:check- lint checkbiome:check:write- lint with auto-fixbiome:format- format codebiome:format:check- check formattingbiome:ci- CI-friendly lint checklint- alias for biome:checkformat- alias for biome:formatConfiguration Highlights
Test Results
Documentation
Three documentation files included:
BIOME_SETUP.md- Comprehensive setup and usage guideBIOME_SUMMARY.md- Executive summary of changesBIOME_QUICKREF.md- Quick command referenceTest plan
pnpm test)pnpm format)pnpm biome:check)pnpm build)🤖 Generated with Claude Code