Skip to content

Commit 93fd254

Browse files
authored
docs: add CLAUDE.md with project conventions and architecture (#2)
* docs: add CLAUDE.md with project conventions and architecture * fix(ci): add build step before lint in CI workflow The lint job imports @pleaseai/eslint-config which requires built dist/ files. Without building first, ESLint fails with ERR_PACKAGE_PATH_NOT_EXPORTED. * style: apply lint auto-fixes across packages - Reorder package.json properties per eslint-plugin-package-json - Fix indentation in eslint-config/src/index.ts - Fix import ordering in eslint-config/src/index.ts - Add trailing newlines to perttier-config files
1 parent bebd1ec commit 93fd254

8 files changed

Lines changed: 67 additions & 17 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ jobs:
1919
- name: Install dependencies
2020
run: bun install
2121

22+
- name: Build packages
23+
run: bun run build
24+
2225
- name: Cache ESLint
2326
uses: actions/cache@v4
2427
with:

CLAUDE.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# @pleaseai/code-style
2+
3+
Monorepo providing shared code style configurations for PleaseAI projects.
4+
5+
## Tech Stack
6+
7+
- Package manager: bun (>=1.3.10)
8+
- Build orchestration: Turborepo
9+
- Module system: ESM only (`"type": "module"`)
10+
- Node: >=22.0.0
11+
- TypeScript target: ES2022, moduleResolution: bundler
12+
13+
## Packages
14+
15+
| Package | Path | Build |
16+
|---------|------|-------|
17+
| `@pleaseai/eslint-config` | `packages/eslint-config` | tsdown |
18+
| `@pleaseai/prettier-config` | `packages/perttier-config` | none (JSON only) |
19+
| `@pleaseai/editorconfig` | `packages/editorconfig` | none (static file) |
20+
21+
## Commands
22+
23+
- `bun install` - Install dependencies
24+
- `bun run build` - Build all packages via Turborepo
25+
- `bun run lint` - Lint repo (dogfoods own eslint-config)
26+
- `bun run lint:fix` - Lint with auto-fix
27+
28+
## Architecture
29+
30+
- `packages/eslint-config` wraps `@antfu/eslint-config` with PleaseAI defaults (2-space indent, single quotes, no semi)
31+
- `packages/eslint-config/src/package-json.ts` exports `eslint-plugin-package-json` configs
32+
- Root `eslint.config.ts` dogfoods `@pleaseai/eslint-config`
33+
34+
## Code Style
35+
36+
- Follow @antfu/eslint-config conventions: no semicolons, single quotes, 2-space indent
37+
- ESM imports only, no CommonJS
38+
39+
## Release
40+
41+
- Uses release-please (Google) for automated versioning and changelogs
42+
- Config: `release-please-config.json` + `.release-please-manifest.json`
43+
- Publishing: GitHub Actions workflow publishes to npm on release
44+
45+
## Gotchas
46+
47+
- `packages/perttier-config` directory is intentionally(?) misspelled — do not rename without coordinating release-please config, CI workflows, and npm package name

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"name": "@pleaseai/code-style-monorepo",
3+
"type": "module",
34
"version": "0.0.1",
45
"private": true,
5-
"type": "module",
6+
"packageManager": "bun@1.3.10",
67
"description": "code-style for PleaseAI",
78
"repository": {
89
"type": "git",
910
"url": "https://github.com/pleaseai/code-style.git"
1011
},
11-
"packageManager": "bun@1.3.10",
1212
"engines": {
1313
"node": ">=22.0.0",
1414
"bun": ">=1.3.10"

packages/eslint-config/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@pleaseai/eslint-config",
3-
"version": "0.0.1",
43
"type": "module",
4+
"version": "0.0.1",
55
"description": "ESLint config for PleaseAI projects",
66
"exports": {
77
".": {
@@ -21,13 +21,13 @@
2121
"scripts": {
2222
"build": "tsdown"
2323
},
24+
"peerDependencies": {
25+
"eslint": "^9.10.0 || ^10.0.0"
26+
},
2427
"dependencies": {
2528
"@antfu/eslint-config": "^7.7.0",
2629
"eslint-plugin-package-json": "^0.30.0"
2730
},
28-
"peerDependencies": {
29-
"eslint": "^9.10.0 || ^10.0.0"
30-
},
3131
"devDependencies": {
3232
"eslint": "^10.0.3",
3333
"tsdown": "^0.12.0",

packages/eslint-config/src/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import antfu from '@antfu/eslint-config'
21
import type { OptionsConfig, TypedFlatConfigItem } from '@antfu/eslint-config'
2+
import antfu from '@antfu/eslint-config'
33

44
export function pleaseai(
55
options: OptionsConfig = {},
@@ -14,9 +14,9 @@ export function pleaseai(
1414
},
1515
typescript: true,
1616
gitignore: true,
17-
rules: {
18-
'test/prefer-lowercase-title': 'off',
19-
},
17+
rules: {
18+
'test/prefer-lowercase-title': 'off',
19+
},
2020
...options,
2121
},
2222
...userConfigs,

packages/eslint-config/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"module": "ESNext",
55
"moduleResolution": "bundler",
66
"strict": true,
7-
"skipLibCheck": true,
8-
"declaration": true
7+
"declaration": true,
8+
"skipLibCheck": true
99
}
1010
}

packages/perttier-config/index.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
"bracketSameLine": false,
1111
"printWidth": 120,
1212
"trailingComma": "all"
13-
}
13+
}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "@pleaseai/prettier-config",
33
"main": "index.json",
4-
"devDependencies": {
5-
"prettier": "^3.8.1"
6-
},
74
"peerDependencies": {
85
"prettier": "^2.8.8 || ^3.0.0"
6+
},
7+
"devDependencies": {
8+
"prettier": "^3.8.1"
99
}
10-
}
10+
}

0 commit comments

Comments
 (0)