clash-verge-rev/Makefile.toml
Slinetrac 9b0aa262bd
chore: add i18n:format/types to pre-commit (#6515)
* chore(i18n): update generated files to match repo style

* chore: add i18n:format/types to pre-commit
2026-03-15 12:51:57 +00:00

80 lines
1.7 KiB
TOML

[config]
skip_core_tasks = true
skip_git_env_info = true
skip_rust_env_info = true
skip_crate_env_info = true
# --- Backend ---
[tasks.rust-format]
install_crate = "rustfmt"
command = "cargo"
args = ["fmt", "--", "--emit=files"]
[tasks.rust-clippy]
description = "Run cargo clippy to lint the code"
command = "cargo"
args = ["clippy", "--all-targets", "--all-features", "--", "-D", "warnings"]
# --- Frontend ---
[tasks.eslint]
description = "Run ESLint to lint the code"
command = "pnpm"
args = ["lint"]
[tasks.eslint.windows]
command = "pnpm.cmd"
[tasks.typecheck]
description = "Run type checks"
command = "pnpm"
args = ["typecheck"]
[tasks.typecheck.windows]
command = "pnpm.cmd"
[tasks.lint-staged]
description = "Run lint-staged for staged files"
command = "pnpm"
args = ["exec", "lint-staged"]
[tasks.lint-staged.windows]
command = "pnpm.cmd"
[tasks.i18n-format]
description = "Format i18n keys"
command = "pnpm"
args = ["i18n:format"]
[tasks.i18n-format.windows]
command = "pnpm.cmd"
[tasks.i18n-types]
description = "Generate i18n key types"
command = "pnpm"
args = ["i18n:types"]
[tasks.i18n-types.windows]
command = "pnpm.cmd"
[tasks.git-add]
description = "Add changed files to git"
command = "git"
args = ["add", "."]
# --- Jobs ---
[tasks.frontend-format]
description = "Frontend format checks"
dependencies = ["i18n-format", "i18n-types", "git-add", "lint-staged"]
[tasks.frontend-lint]
description = "Frontend linting and type checking"
dependencies = ["eslint", "typecheck"]
# --- Git Hooks ---
[tasks.pre-commit]
description = "Pre-commit checks: format only"
dependencies = ["rust-format", "frontend-format"]
[tasks.pre-push]
description = "Pre-push checks: lint and typecheck"
dependencies = ["rust-clippy", "frontend-lint"]