cherry-studio/.pre-commit-config.yaml
SuYao 1885f9cecb
feat: migrate from husky to prek for git hooks (#12491)
* feat: migrate from husky to prek for git hooks

Replace husky + lint-staged with prek (pre-commit re-engineered in Rust) for
faster and more efficient git hooks management.

Changes:
- Add @j178/prek dependency
- Create .pre-commit-config.yaml with equivalent hooks
- Update prepare script to use prek install
- Remove husky, lint-staged dependencies and configuration
- Remove .husky directory

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* build: add @j178/prek to onlyBuiltDependencies

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: icarus <eurfelux@gmail.com>
2026-01-17 14:22:58 +08:00

23 lines
701 B
YAML

repos:
- repo: local
hooks:
- id: biome-format-js
name: Biome format (JS/TS)
language: system
entry: pnpm biome format --write --no-errors-on-unmatched
files: '\.(js|jsx|ts|tsx|cjs|mjs|cts|mts)$'
pass_filenames: true
- id: eslint-fix
name: ESLint fix
language: system
entry: pnpm eslint --fix
files: '\.(js|jsx|ts|tsx|cjs|mjs|cts|mts)$'
pass_filenames: true
- id: biome-format-other
name: Biome format (JSON/YAML/CSS/HTML)
language: system
entry: pnpm biome format --write --no-errors-on-unmatched
files: '\.(json|yml|yaml|css|html)$'
pass_filenames: true