Repository navigation
Expand file tree
/
Copy pathreact.yaml
More file actions
53 lines (44 loc) · 1.5 KB
/
Copy pathreact.yaml
File metadata and controls
53 lines (44 loc) · 1.5 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# skillgate — definition of done for a React / Next.js app
#
# Deterministic review gates for AI-generated React code: the checks an LLM will
# happily skip to reach "done". Adjust the commands to your scripts.
# Docs: https://github.com/renezander030/skillgate
name: react-definition-of-done
finishLine:
- "git commit"
- "git push"
- "vercel deploy"
gates:
- id: typecheck
description: TypeScript has no errors
type: command
run: "tsc --noEmit"
- id: lint
description: ESLint passes
type: command
run: "eslint . --max-warnings=0"
- id: tests-pass
description: Component/unit tests pass
type: command
run: "npm test --silent"
- id: no-focused-tests
description: No it.only / describe.only left behind (would silently skip the suite)
type: absent
glob: "src/**/*.{test,spec}.{ts,tsx,js,jsx}"
pattern: '\b(it|test|describe|context)\.only\('
- id: no-debug-logs
description: No stray console.log in shipped components
type: absent
glob: "src/**/*.{ts,tsx,js,jsx}"
pattern: 'console\.(log|debug)\('
ignore: ["**/*.{test,spec}.*"]
- id: no-dangerous-html
description: No unreviewed dangerouslySetInnerHTML (XSS surface)
type: absent
glob: "src/**/*.{tsx,jsx}"
pattern: "dangerouslySetInnerHTML"
- id: no-secrets
description: No client-exposed secrets or private keys
type: absent
glob: "src/**/*.{ts,tsx,js,jsx}"
pattern: 'sk_live_[A-Za-z0-9]{16,}|ghp_[A-Za-z0-9]{36}|-----BEGIN (RSA |EC )?PRIVATE KEY-----'