Commit d7467ed
committed
Add Nix dev environment, replace husky with git hooks
Sets up a Nix-based dev environment (fenix + crane) and swaps the
husky pre-commit hook for a tracked .githooks directory wired via
core.hooksPath.
Husky and lint-staged weren't doing much. The only tracked JS is
index.js and index.d.ts, both auto-generated by NAPI-RS with
eslint-disable and prettier-ignore at the top. lint-staged was
formatting code that opts out of linting, while the Rust source
got nothing. The new hook just runs `just check`, which runs
`nix flake check` (fmt, clippy, build).
Cargo.lock is now tracked. Crane vendors git deps from it so it
has to be visible to Nix, and for a library shipped via npm
tracking the lockfile is the right call anyway as binaries are
produced.1 parent 0b8ff1e commit d7467ed
12 files changed
Lines changed: 3467 additions & 232 deletions
File tree
- .githooks
- .github/workflows
- .husky
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
53 | 52 | | |
54 | | - | |
55 | | - | |
| 53 | + | |
| 54 | + | |
56 | 55 | | |
57 | 56 | | |
58 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
121 | 120 | | |
122 | 121 | | |
123 | 122 | | |
| |||
This file was deleted.
This file was deleted.
0 commit comments