From 454a5b54bd2fd21166e778f1b423bbf177cfe240 Mon Sep 17 00:00:00 2001 From: xingyu4j Date: Tue, 19 May 2026 15:54:03 +0800 Subject: [PATCH] chore: lefthook config --- lefthook.yml | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/lefthook.yml b/lefthook.yml index fec09546b..9781b760a 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -44,33 +44,20 @@ pre-commit: parallel: true commands: - code-workspace: - run: pnpm vsh code-workspace --auto-commit - lint-md: - run: pnpm oxfmt {staged_files} - glob: '*.md' - lint-vue: - run: pnpm oxfmt {staged_files} && pnpm oxlint --fix --no-error-on-unmatched-pattern {staged_files} && pnpm eslint --cache --fix {staged_files} && pnpm stylelint --fix --allow-empty-input {staged_files} - glob: '*.vue' - lint-js: - run: pnpm oxfmt {staged_files} && pnpm oxlint --fix --no-error-on-unmatched-pattern {staged_files} && pnpm eslint --cache --fix {staged_files} - glob: '*.{js,jsx,ts,tsx}' - lint-style: - run: pnpm oxfmt {staged_files} && pnpm stylelint --fix --allow-empty-input {staged_files} - glob: '*.{scss,less,styl,html,vue,css}' - lint-package: - run: pnpm oxfmt {staged_files} - glob: 'package.json' - lint-json: - run: pnpm oxfmt {staged_files} - glob: '{!(package)*.json,*.code-snippets,.!(browserslist)*rc}' + install: + run: pnpm install post-merge: commands: install: run: pnpm install + lint: + run: pnpm lint + checkType: + run: pnpm check:type commit-msg: commands: commitlint: run: pnpm exec commitlint --edit $1 +