[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.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", "src/locales", "crates/clash-verge-i18n/locales", "src/types/generated", ] # --- Jobs --- [tasks.frontend-format] description = "Frontend format checks" dependencies = ["i18n-format", "i18n-types", "git-add", "lint-staged"] # --- 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", "typecheck"]