create-claude-workspace 1.1.63 → 1.1.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -245,50 +245,12 @@ Framework-specific best practices, component architecture, state management, SSR
|
|
|
245
245
|
|
|
246
246
|
### Test Coverage
|
|
247
247
|
|
|
248
|
-
|
|
249
|
-
| Metric | Threshold |
|
|
250
|
-
|--------|-----------|
|
|
251
|
-
| Statements | 80% |
|
|
252
|
-
| Branches | 80% |
|
|
253
|
-
| Functions | 80% |
|
|
254
|
-
| Lines | 80% |
|
|
255
|
-
|
|
256
|
-
**Vitest coverage** (configured per project in `vite.config.ts` or `vitest.config.ts`):
|
|
257
|
-
```typescript
|
|
258
|
-
test: {
|
|
259
|
-
coverage: {
|
|
260
|
-
provider: 'v8',
|
|
261
|
-
reporter: ['text', 'text-summary', 'cobertura', 'html'],
|
|
262
|
-
reportsDirectory: '../../coverage/[PROJECT_NAME]',
|
|
263
|
-
thresholds: {
|
|
264
|
-
statements: 80,
|
|
265
|
-
branches: 80,
|
|
266
|
-
functions: 80,
|
|
267
|
-
lines: 80,
|
|
268
|
-
},
|
|
269
|
-
include: ['src/**/*.ts'],
|
|
270
|
-
exclude: [
|
|
271
|
-
'src/**/*.spec.ts',
|
|
272
|
-
'src/**/index.ts',
|
|
273
|
-
'src/main.ts',
|
|
274
|
-
'src/**/*.config*.ts',
|
|
275
|
-
'src/**/*.routes.ts',
|
|
276
|
-
],
|
|
277
|
-
},
|
|
278
|
-
}
|
|
279
|
-
```
|
|
280
|
-
|
|
281
|
-
**Key points:**
|
|
282
|
-
- `cobertura` reporter generates XML for GitLab/GitHub coverage visualization
|
|
283
|
-
- `html` reporter generates browsable reports in `coverage/[PROJECT]/`
|
|
284
|
-
- Coverage reports are aggregated at workspace root under `coverage/`
|
|
285
|
-
- Add `coverage/` to `.gitignore`
|
|
248
|
+
80% minimum for statements, branches, functions, lines (enforced in CI).
|
|
286
249
|
|
|
287
|
-
**
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
nx affected --target=test -- --coverage
|
|
291
|
-
```
|
|
250
|
+
- **Config template**: `.claude/templates/vitest.coverage.ts` — merge into each project's `vite.config.ts` or `vitest.config.ts` during scaffolding. Replace `[PROJECT_NAME]` with actual name.
|
|
251
|
+
- Reporters: `cobertura` (GitLab/GitHub MR coverage), `html` (browsable), `text-summary`
|
|
252
|
+
- Coverage aggregated at workspace root under `coverage/` (add to `.gitignore`)
|
|
253
|
+
- Run: `nx test [PROJECT] --coverage` or `nx affected --target=test -- --coverage`
|
|
292
254
|
|
|
293
255
|
### Code Quality & Linting
|
|
294
256
|
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Vitest coverage config — add to each project's vite.config.ts or vitest.config.ts
|
|
2
|
+
// Replace [PROJECT_NAME] with the actual project name.
|
|
3
|
+
export default {
|
|
4
|
+
test: {
|
|
5
|
+
coverage: {
|
|
6
|
+
provider: 'v8',
|
|
7
|
+
reporter: ['text', 'text-summary', 'cobertura', 'html'],
|
|
8
|
+
reportsDirectory: '../../coverage/[PROJECT_NAME]',
|
|
9
|
+
thresholds: {
|
|
10
|
+
statements: 80,
|
|
11
|
+
branches: 80,
|
|
12
|
+
functions: 80,
|
|
13
|
+
lines: 80,
|
|
14
|
+
},
|
|
15
|
+
include: ['src/**/*.ts'],
|
|
16
|
+
exclude: [
|
|
17
|
+
'src/**/*.spec.ts',
|
|
18
|
+
'src/**/index.ts',
|
|
19
|
+
'src/main.ts',
|
|
20
|
+
'src/**/*.config*.ts',
|
|
21
|
+
'src/**/*.routes.ts',
|
|
22
|
+
],
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
};
|