Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 60c1f2a

Browse files
authored
Merge pull request #580 from rolod0x/ai
2 parents 1b186a4 + ce11c67 commit 60c1f2a

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

.claude/settings.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(pnpm rolod0x:*)",
5+
"Bash(pnpm lint:*)",
6+
"Bash(pnpm lint:fix:*)",
7+
"Bash(pnpm prettier:*)",
8+
"Bash(pnpm build:*)",
9+
"Bash(pnpm vitest run:*)"
10+
],
11+
"deny": ["Bash(npm:*)", "Bash(npx:*)"]
12+
}
13+
}

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ dist
22
distribution
33
demo-video/
44
node_modules
5+
.claude/settings.local.json
56
.gitignore
67
.github
78
.eslintignore

AGENTS.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,15 @@ possible.
6060
- Use `pnpm` for package management
6161
- **IMPORTANT**: NEVER EVER use `npx` without permission!
6262
- Use `pnpm vitest run $FILE_TO_TEST` to run tests
63+
- Use `pnpm lint` to run eslint and prettier in parallel
64+
- Use `pnpm lint:fix` to ask eslint and prettier to auto-fix issues
6365
- Run `pnpm build` to ensure that the code compiles correctly
66+
- Run `pnpm rolod0x` to test the CLI
6467
- Run `pnpm link --global` to install CLI scripts globally
6568

6669
### Code Quality
6770

71+
- Honour settings in `.editorconfig`
6872
- ESLint for code linting
6973
- Prettier for code formatting
7074
- Commitlint for conventional commit messages, with appropriate commit types:
@@ -87,13 +91,25 @@ possible.
8791
### General best practices
8892

8993
- Avoid code duplication as much as possible
94+
- Keep code files under 300 lines
95+
- One class per file
96+
- .ts files should use kebab-case.ts not camelCase.ts or another style
97+
- .tsx files should use CamelCase.tsx, except for `index.tsx`
9098
- Follow TypeScript best practices
9199
- Use proper type annotations
92100
- Document complex logic
93101
- Follow the principle of least privilege for extension permissions
94102

95103
### Testing best practices
96104

105+
**IMPORTANT**: These are all non-negotiable best practices!
106+
107+
- **Test runs must be 100% clean** with no stderr output. Always
108+
mock console.error, console.warn, or any logging that would appear in test
109+
output, and verify the expected messages in assertions instead.
110+
- **NEVER EVER** copy code to be tested from the source files
111+
into the test files!! The test suite should ONLY ever test code which
112+
exists in the main implementation source files.
97113
- Write tests for new features and ensure they pass
98114
- Use React Testing Library for component tests
99115
- Test behavior, not implementation

0 commit comments

Comments
 (0)