-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(ci): replace pre-commit into prek
#17703
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| default_language_version: | ||
| node: latest | ||
| node: "22" | ||
| exclude: '\.snap|node_modules$' | ||
| repos: | ||
| - repo: https://github.com/pre-commit/pre-commit-hooks | ||
|
|
@@ -23,13 +23,25 @@ repos: | |
| - id: flake8 | ||
| - id: fix-encoding-pragma | ||
| args: ['--remove'] | ||
| - repo: https://github.com/getsentry/pre-commit-hooks | ||
| rev: f3237d2d65af81d435c49dee3593dc8f03d23c2d | ||
| - repo: local | ||
| hooks: | ||
| - id: prettier | ||
| entry: node_modules/.bin/prettier | ||
| name: Prettier | ||
| description: This hook runs Prettier on JavaScript and TypeScript files | ||
| entry: prettier | ||
| language: node | ||
| files: '\.[jt]sx?$' | ||
| 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] | ||
|
Comment on lines
+34
to
+44
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: The local Suggested FixTo fix this, either change the language to Prompt for AI AgentDid we get this right? 👍 / 👎 to inform future reviews. |
||
| - repo: https://github.com/crate-ci/typos | ||
| rev: v1.39.0 | ||
| hooks: | ||
|
|
||
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.
Prettier hook file pattern excludes markdown and mjs
Medium Severity
The new prettier hook's
filespattern'\.[jt]sx?$'only matches.js,.jsx,.ts, and.tsxfiles. However, the project's CI lint command (lint:prettierinpackage.json) checks{md,mdx,ts,tsx,js,jsx,mjs}files, andprettier.config.jshas explicit overrides for*.mdand*.mdx. This means the pre-commit hook will no longer catch formatting issues in markdown, MDX, or.mjsfiles before commit — developers will only learn about them when CI fails.Reviewed by Cursor Bugbot for commit bbf8b56. Configure here.