-
Notifications
You must be signed in to change notification settings - Fork 2
/
pre-commit.nix
39 lines (34 loc) · 940 Bytes
/
pre-commit.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{ inputs, ... }: {
imports = [
inputs.pre-commit-hooks.flakeModule
];
perSystem = { config, ... }: {
devShells.default = config.pre-commit.devShell;
pre-commit.settings = {
hooks = {
# Typos
typos.enable = true;
# Markdown
markdownlint.enable = true;
# Nix
nixpkgs-fmt.enable = true;
deadnix.enable = true;
# Haskell
cabal-fmt.enable = true;
hlint.enable = true;
fourmolu.enable = true;
# Typescript
denofmt = {
enable = true;
# NOTE(jaredponn): We follow the default files deno formats, except
# we exclude markdown files. See:
# [1] https://docs.deno.com/runtime/manual/tools/formatter
files = ''^.*\.(js|ts|jsx|tsx|json|jsonc)$'';
};
denolint.enable = true;
# Rust
rustfmt-monorepo.enable = true;
};
};
};
}