Skip to content

fix: add biome pre-commit hook and standardize dependabot yaml#235

Open
santoslgl01-web wants to merge 1 commit into
john-bampton:mainfrom
santoslgl01-web:fix/issue-120
Open

fix: add biome pre-commit hook and standardize dependabot yaml#235
santoslgl01-web wants to merge 1 commit into
john-bampton:mainfrom
santoslgl01-web:fix/issue-120

Conversation

@santoslgl01-web
Copy link
Copy Markdown
Contributor

Summary

Testing

  • parsed .pre-commit-config.yaml and .github/dependabot.yml with yaml.safe_load
  • ran git diff --check
  • attempted pre-commit run --files .pre-commit-config.yaml .github/dependabot.yml (blocked by existing repo-level Python version constraint: isort hook requires Python >=3.10 while local environment is Python 3.9)

Fixes #120

@deepsource-io
Copy link
Copy Markdown
Contributor

deepsource-io Bot commented Apr 28, 2026

DeepSource Code Review

We reviewed changes in 7b01e03...c3fa60e on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
Secrets Apr 28, 2026 8:25a.m. Review ↗
Python Apr 28, 2026 8:25a.m. Review ↗
JavaScript Apr 28, 2026 8:25a.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request standardizes Dependabot configurations and replaces Prettier with Biome for pre-commit hooks. Feedback suggests restoring the removed commit scope and cooldown settings in Dependabot, excluding YAML files from Biome as it lacks support for them, and removing the --unsafe flag to prevent unintended logic changes.

Comment thread .github/dependabot.yml
Comment on lines +9 to +13
prefix: "ci"
groups:
github-actions:
patterns:
- '*'
cooldown:
default-days: 7
- package-ecosystem: 'pip'
directory: '/'
- "*"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

The include: "scope" and cooldown configurations were removed from the github-actions update block. These settings are functional configurations that control commit message formatting and pull request frequency. If the intent was only to standardize quoting and indentation, these should be restored.

      prefix: "ci"
      include: "scope"
    groups:
      github-actions:
        patterns:
          - "*"
    cooldown:
      default-days: 7

Comment thread .github/dependabot.yml
Comment on lines +19 to +23
prefix: "deps"
groups:
python-dependencies:
patterns:
- '*'
cooldown:
default-days: 7
- "*"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

The include: "scope" and cooldown configurations were also removed from the pip update block. These should be restored to maintain consistent behavior for Python dependency updates.

      prefix: "deps"
      include: "scope"
    groups:
      python-dependencies:
        patterns:
          - "*"
    cooldown:
      default-days: 7

Comment thread .pre-commit-config.yaml
- id: biome-check
name: run biome formatter/checker
args: [--write, --unsafe]
files: ^(.*\.(json|jsonc|js|jsx|ts|tsx|css)|\.github/.*\.ya?ml)$
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

Biome does not currently support YAML formatting. The previous prettier hook was specifically configured to format .yaml and .yml files. By replacing it with Biome and including YAML files in the files filter, you are effectively disabling automated formatting for these files. It is recommended to exclude YAML from the Biome hook and restore a YAML-capable formatter.

        files: ^(.*\.(json|jsonc|js|jsx|ts|tsx|css))$

Comment thread .pre-commit-config.yaml
additional_dependencies: ['prettier@3.8.3']
- id: biome-check
name: run biome formatter/checker
args: [--write, --unsafe]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The --unsafe flag allows Biome to perform transformations that can alter code logic (such as removing unused imports or variables). In a pre-commit hook, it is generally safer to avoid automated logic changes to prevent unintended side effects in the codebase. Consider removing this flag.

        args: [--write]

@jbampton
Copy link
Copy Markdown
Member

You need to run the same version of Python that our project uses.

You can install a new version of Python since 3.9 is EOL

https://endoflife.date/python

Try https://github.com/pyenv/pyenv

Copy link
Copy Markdown
Member

@jbampton jbampton left a comment

Choose a reason for hiding this comment

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

Why are you removing code ?

@santoslgl01-web
Copy link
Copy Markdown
Contributor Author

Thanks for the review. I’m updating this from a newer Python environment so I can rerun the project’s expected tooling cleanly and restore the removed configuration rather than dropping it. I’ll push a follow-up once the requested changes are addressed.

@jbampton
Copy link
Copy Markdown
Member

jbampton commented May 1, 2026

We had a git blocker that I fixed. Was running on everyones forks and messing up their branches

https://github.com/john-bampton/john-bampton.github.io/pull/236/changes

@santoslgl01-web sorry about that mate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Biome format and lint with pre-commit. Standardize the indentation

2 participants