Skip to content
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

Replace prettier with biome #598

Merged
merged 1 commit into from
Aug 5, 2024
Merged

Replace prettier with biome #598

merged 1 commit into from
Aug 5, 2024

Conversation

CoMPaTech
Copy link
Member

@CoMPaTech CoMPaTech commented Aug 4, 2024

Summary by CodeRabbit

  • New Features

    • Transitioned from Prettier to Biome for code formatting and linting, enhancing overall code quality checks.
  • Improvements

    • Updated pre-commit hook configuration to support the new Biome tool, improving the efficiency of linting processes.

@CoMPaTech CoMPaTech added enhancement New feature or request dependencies Pull requests that update a dependency file labels Aug 4, 2024
Copy link
Contributor

coderabbitai bot commented Aug 4, 2024

Walkthrough

The project has transitioned from using Prettier for code formatting to adopting Biome, an advanced tool for linting and formatting. This change involves updating the pre-commit configuration to point to the new Biome repository and renaming the relevant hook. An additional dependency on a specific version of Biome has also been introduced, enhancing the project's code quality practices.

Changes

Files Change Summary
.pre-commit-config.yaml Replaced Prettier repository with Biome, renamed hook to biome-lint, and added dependency on @biomejs/biome@1.8.3.

Poem

In fields of code where bunnies play,
We’ve hopped to Biome, hip-hip-hooray! 🐇
Prettier's gone, but fear not, my friend,
With new tools to help us, our joys never end.
Linting and formatting, all in one hop,
Let’s dance through the code, we’ll never stop! 🌟


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

sonarqubecloud bot commented Aug 4, 2024

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 8593e1f and aeba1ac.

Files selected for processing (1)
  • .pre-commit-config.yaml (1 hunks)
Additional comments not posted (3)
.pre-commit-config.yaml (3)

95-95: Verify the new repository URL.

Ensure that the new repository URL https://github.com/biomejs/pre-commit is correct and accessible.

Verification successful

The new repository URL is correct and accessible.

The repository URL https://github.com/biomejs/pre-commit returned a status code 200, indicating it is accessible.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the new repository URL for Biome pre-commit hook.

# Test: Check if the repository is accessible. Expect: HTTP status code 200.
curl -o /dev/null -s -w "%{http_code}\n" https://github.com/biomejs/pre-commit

Length of output: 84


98-98: Verify the new hook ID.

Ensure that the new hook ID biome-lint is correct and matches the expected ID in the Biome repository.

Verification successful

The new hook ID biome-lint is correct.

The hook ID biome-lint is present in the Biome repository, confirming that the change in the .pre-commit-config.yaml file is accurate.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the new hook ID for Biome pre-commit hook.

# Test: Check if the hook ID `biome-lint` is present in the Biome repository.
curl -s https://raw.githubusercontent.com/biomejs/pre-commit/main/.pre-commit-hooks.yaml | grep 'id: biome-lint'

Length of output: 133


99-99: Verify the additional dependency.

Ensure that the additional dependency @biomejs/biome@1.8.3 is correct and necessary for the Biome pre-commit hook.

Verification successful

The additional dependency @biomejs/biome@1.8.3 is correctly specified and necessary for the biome-lint pre-commit hook.

  • The .pre-commit-config.yaml file includes a configuration for the biome-lint hook that requires this dependency.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the additional dependency for Biome pre-commit hook.

# Test: Check if the specified version of the additional dependency is available.
npm show @biomejs/biome@1.8.3 version

Length of output: 110


Script:

#!/bin/bash
# Description: Search for references to @biomejs/biome in the codebase to verify its necessity.

# Find all occurrences of @biomejs/biome in the repository
rg '@biomejs/biome' -A 5

Length of output: 24


Script:

#!/bin/bash
# Description: Search for the configuration of the Biome pre-commit hook in the .pre-commit-config.yaml file.

# Find all occurrences of Biome in the .pre-commit-config.yaml file
rg 'Biome' .pre-commit-config.yaml -A 5

Length of output: 39


Script:

#!/bin/bash
# Description: Search for the configuration of pre-commit hooks in the .pre-commit-config.yaml file.

# Find all occurrences of pre-commit hooks in the .pre-commit-config.yaml file
rg 'hooks' .pre-commit-config.yaml -A 10

Length of output: 2347

Copy link

codecov bot commented Aug 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (8593e1f) to head (aeba1ac).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #598   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           20        20           
  Lines         3318      3318           
=========================================
  Hits          3318      3318           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@CoMPaTech CoMPaTech marked this pull request as ready for review August 4, 2024 20:04
@CoMPaTech CoMPaTech requested a review from a team as a code owner August 4, 2024 20:04
@CoMPaTech CoMPaTech merged commit 41befe3 into main Aug 5, 2024
16 checks passed
@CoMPaTech CoMPaTech deleted the pre-commit branch August 5, 2024 06:51
@coderabbitai coderabbitai bot mentioned this pull request Sep 19, 2024
@coderabbitai coderabbitai bot mentioned this pull request Dec 8, 2024
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants