feat(ci): replace pre-commit into prek#17703
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 4a9ff99. Configure here.
| exclude: 'node_modules' | ||
| types: [text] | ||
| args: ['--write'] | ||
| - id: eslint | ||
| entry: node_modules/.bin/eslint | ||
| name: eslint | ||
| description: This hook runs eslint on JavaScript and TypeScript files | ||
| entry: eslint | ||
| language: node | ||
| files: '\.[jt]sx?$' | ||
| exclude: 'node_modules' | ||
| types: [text] |
There was a problem hiding this comment.
Bug: The local prettier and eslint hooks use language: node without additional_dependencies, which will cause them to fail with 'executable not found' errors during commits.
Severity: MEDIUM
Suggested Fix
To fix this, either change the language to language: system and point the entry to the project's local node_modules/.bin executables, or add additional_dependencies: [prettier, eslint] to the hook definitions to ensure the tools are installed in the isolated hook environment.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: .pre-commit-config.yaml#L28-L44
Potential issue: The `pre-commit` configuration for the local `prettier` and `eslint`
hooks specifies `language: node`. This creates an isolated, empty Node.js environment
for the hooks. Because `additional_dependencies` are not provided, the `prettier` and
`eslint` packages will not be installed into this environment. As a result, when a
developer attempts to commit a file that triggers these hooks, the `pre-commit`
framework will be unable to find the `prettier` or `eslint` executables, causing the
hook to fail and blocking the commit.
Did we get this right? 👍 / 👎 to inform future reviews.

DESCRIBE YOUR PR
Faster execution than
pre-commit. Thesentryandself-hostedrepo are already using it right now.IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs to go live.
SLA
Thanks in advance for your help!
PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes:
LEGAL BOILERPLATE
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.
EXTRA RESOURCES