summaryrefslogtreecommitdiff
path: root/git-hooks
diff options
context:
space:
mode:
authorojacobson <ojacobson@noreply.codeberg.org>2025-06-11 18:27:15 +0200
committerojacobson <ojacobson@noreply.codeberg.org>2025-06-11 18:27:15 +0200
commita6ae7ee0170e2235ffc9c4eacddae2fb6878ad07 (patch)
treeb183dc5557b9e6c6d46385581f74d30001d06065 /git-hooks
parent71919b461f25bed1bb4708b0494d603de373ae11 (diff)
parentc0f3495ea54d12b2bad9b937ea9334594d0aa248 (diff)
Consolidate project linting into tool scripts.
The new `tools/check-lint` script checks lints across _all_ lintable files - JS (through `eslint`), and Rust (through `clippy` and `cargo check`). It also checks `eslint` against the whole project, not just against what's in the `ui` subdir, which means it now catches lintable issues in various JS config files. This was originally part of [another proposal][pr-6]. I've broken it out to make the intent clearer, and to make the proposal easier to get a handle on in isolation from other, related changes. Thanks to @wlonk for their input on this! [pr-6]: https://codeberg.org/ojacobson/pilcrow/pulls/6 Merges prop/lint-checks into main.
Diffstat (limited to 'git-hooks')
-rwxr-xr-xgit-hooks/pre-commit4
1 files changed, 1 insertions, 3 deletions
diff --git a/git-hooks/pre-commit b/git-hooks/pre-commit
index 3d0ae17..ea34684 100755
--- a/git-hooks/pre-commit
+++ b/git-hooks/pre-commit
@@ -4,14 +4,12 @@
# run. It gets old fast. That's why this doesn't run tests, for example.
tools/check-format
+tools/check-lint
# Make sure package-lock.json is up to date with package.json
npm ci --dry-run
# Make sure Cargo.lock is up to date with Cargo.toml.
cargo update --locked --workspace
-# Make sure there are no screamers in the code (both languages).
-npm run lint
-cargo check
# Make sure the prepared statement data in .sqlx is up to date. Requires
# `cargo-sqlx` (`cargo install cargo-sqlx`).
export DATABASE_URL=sqlite://pilcrow.db.pre-commit?mode=rwc