You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+85-7Lines changed: 85 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,12 +16,79 @@ Athena is a gRPC-based image classification service designed for CSAM (Child Sex
16
16
17
17
# Contributing
18
18
19
+
## Code Quality and Pre-commit Hooks
20
+
21
+
This project uses pre-commit hooks to ensure code quality and consistency. The hooks run linting, formatting, and type checking before each commit.
22
+
23
+
### Setting up Pre-commit Hooks
24
+
25
+
1.**Install pre-commit** (if not already installed):
26
+
```sh
27
+
uvx pre-commit --help
28
+
```
29
+
Or install globally:
30
+
```sh
31
+
uv tool install pre-commit
32
+
```
33
+
34
+
2.**Install the hooks**:
35
+
```sh
36
+
uvx pre-commit install
37
+
```
38
+
39
+
3.**Run all quality checks manually**:
40
+
```sh
41
+
npm run lint:all
42
+
```
43
+
44
+
### What the Pre-commit Hooks Check
45
+
46
+
-**ESLint**: Code quality and style issues
47
+
-**Prettier**: Code formatting consistency
48
+
-**TypeScript**: Type checking and compilation
49
+
-**File checks**: Trailing whitespace, file endings, large files, etc.
50
+
-**Submodule status**: Ensures submodules are properly tracked
51
+
52
+
### Manual Quality Checks
53
+
54
+
You can run individual checks manually:
55
+
56
+
```sh
57
+
# Run ESLint
58
+
npm run lint
59
+
60
+
# Check Prettier formatting
61
+
npm run prettier:check
62
+
63
+
# Fix Prettier formatting
64
+
npm run prettier
65
+
66
+
# TypeScript type checking
67
+
npx tsc --noEmit
68
+
69
+
# Run all checks at once
70
+
npm run lint:all
71
+
```
72
+
19
73
## Updating the Protobuf definitions
20
74
21
-
Protobufs are stored in the [@crispthinking/athena-protobuffs](https://github.com/crispthinking/athena-protobufs) repository.
75
+
Protobufs are stored as a git submodule from the [@crispthinking/athena-nodejs-client](https://github.com/crispthinking/athena-nodejs-client.git) repository.
22
76
23
-
To update the protobuf definitions for client generation, run:
0 commit comments