-
Notifications
You must be signed in to change notification settings - Fork 213
feat: migrate from ESLint/Prettier to Biome #1701
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
base: master
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This PR replaces ESLint/Prettier with Biome and reformats code accordingly.
- Switches code formatting and linting to Biome, removing legacy configs.
- Applies consistent multiline formatting (constructors, chained calls, regex literals).
- Updates package.json scripts to invoke Biome commands.
Reviewed Changes
Copilot reviewed 29 out of 31 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
src/v2/providers/https.ts | Added trailing comma in generic type parameter. |
src/v2/providers/firestore.ts | Added trailing comma in generic type parameter. |
src/v1/providers/testLab.ts | Reformatted constructor to multiline parameters. |
src/v1/providers/storage.ts | Reformatted constructors; fixed object metadata comma. |
src/v1/providers/remoteConfig.ts | Reformatted constructor to multiline parameters. |
src/v1/providers/pubsub.ts | Reformatted constructors to multiline parameters. |
src/v1/providers/firestore.ts | Reformatted constructors to multiline parameters. |
src/v1/providers/database.ts | Converted regex to literal; multiline constructors. |
src/v1/providers/analytics.ts | Reformatted constructor to multiline parameters. |
src/v1/cloud-functions.ts | Converted wildcard regex to literal. |
src/params/types.ts | Reformatted generic type definitions. |
src/logger/index.ts | Collapsed assignment into one line. |
src/common/utilities/path-pattern.ts | Converted regex to literal. |
src/common/providers/identity.ts | Reformatted constructor to multiline parameters. |
src/common/params.ts | Reformatted generic type alias to multiline. |
src/common/change.ts | Reformatted constructor to multiline parameters. |
spec/v1/providers/pubsub.spec.ts | Collapsed multiline it callback formatting. |
integration_test/functions/src/v1/*.ts | Collapsed multiline test callbacks globally. |
integration_test/functions/src/index.ts | Reformatted chained admin/Firestore calls. |
package.json | Updated scripts to use Biome (format , lint ). |
biome.json | Added Biome configuration file. |
.prettierrc.js | Removed Prettier configuration. |
.eslintrc.js | Removed ESLint configuration. |
"format": "biome format --write .", | ||
"format:check": "biome format .", | ||
"lint": "biome lint .", | ||
"lint:fix": "biome check --write .", |
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.
[nitpick] Consider renaming the lint:fix
script to use biome lint --fix .
instead of biome check --write .
for clarity and to align with Biome's command structure.
"lint:fix": "biome check --write .", | |
"lint:fix": "biome lint --fix .", |
Copilot uses AI. Check for mistakes.
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.
Copilot is wrong here, biome check --write
is OK. I believe it will be running ALL the checks (formatting, linting, import sorting) so it depends if that's what is intended @taeold - but i think the script as you wrote is fine.
…rmatting - Add Biome as a modern, fast alternative to ESLint + Prettier - Configure Biome to match existing code style (spaces, semicolons, single quotes) - Update npm scripts to use Biome commands (format, lint, lint:fix) - Remove ESLint and Prettier dependencies and config files - Configure Biome to ignore proto/, mocha/, and config files - Disable style rules that would require massive code changes - Keep only essential linting rules for code quality Performance: 10-100x faster (202 files in 33ms vs several seconds) BREAKING CHANGE: ESLint and Prettier are no longer used. Use 'npm run lint' and 'npm run format' with Biome instead.
- Apply Biome's opinionated formatting across the codebase - Updates include: - Closing parentheses moved to same line for arrow functions - Multi-parameter constructors formatted on separate lines - Unnecessary object key quotes removed - Better string concatenation indentation - These changes improve code readability and consistency
- Convert RegExp constructors to regex literals (better performance) - Disable noUselessTernary and noApproximativeNumericConstant rules - The ternary expressions are intentional for clarity - The PI test is checking a specific value, not Math.PI - All tests now pass with npm run lint
d65e9fd
to
eef6ba1
Compare
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.
Should we consider using the dedicated biome ci
I think it supports biome ci --changed
(but biome is so quick anyway, this probably doesn't matter)
LGTM
No description provided.