Commit Graph
4 Commits
Author SHA1 Message Date
Tam Nhu Tran 2f94f35ec3 feat(lint): P7 enforcement gates (no-new-throw-error + max-lines) + docs
Epic P7. Locks in the epic's gains with ESLint gates so the adoption work
does not regress.

- ccs/no-new-throw-error (error): custom flat-config rule that flags NEW
  throw new Error(...) outside a generated baseline allowlist. Forces the
  typed-error taxonomy (src/errors/error-types.ts). Existing 338 sites are
  grandfathered in eslint-rules/throw-error-baseline.json; only NEW violations
  error. Rule normalizes the filename to repo-root-relative to match baseline
  keys regardless of how ESLint reports paths.
- max-lines (warn, 400, skipBlankLines/skipComments): warns on files over
  400 LOC (goal of P5/P6 god-file splits). Currently 51 warnings on the
  not-yet-split god-files (P6 territory).
- scripts/generate-throw-error-baseline.js: emits the allowlist from raw
  source (superset of real throws; never undercounts). Run after intentionally
  grandfathering a site, or quarterly to prune.
- tests/unit/eslint-rules/no-throw-new-error.test.ts: rule logic (flags
  off-allowlist, passes on-allowlist/typed/rethrow, line-sensitivity).
- docs/code-standards.md: Lint Enforcement Gates section.
- docs/logging-contract.md: error.code -> ExitCode table (from P4).

validate + validate:ci-parity green.
2026-06-18 18:48:13 -04:00
Tam Nhu Tran c3c8cb7a82 fix(cliproxy): exclude colocated tests from tsconfig and eslint
- Add src/**/__tests__/** to tsconfig.json exclude list
- Add ignores pattern for __tests__ in eslint.config.mjs
- Fix ui/src/lib/api-client.ts import path for provider-entitlement-types
- Remove stale build artifacts from ui/src/lib/ and tests/mocks/
2026-04-29 17:18:23 -04:00
kaitranntt 06fa724525 feat: upgrade ESLint strictness - Phase 01 complete
Enhance code quality by upgrading 3 TypeScript ESLint rules from warn → error:
- @typescript-eslint/no-unused-vars: warn → error
- @typescript-eslint/no-explicit-any: warn → error
- @typescript-eslint/no-non-null-assertion: warn → error

Results:
- Zero violations found across 10,487 lines of TypeScript code
- 39/39 tests passing with no regressions
- All validation gates pass (typecheck, lint, format, test)
- Code review: EXCELLENT rating, 0 critical issues

Updated documentation:
- docs/code-standards.md: ESLint Quality Gates section
- docs/project-roadmap.md: Phase 01 completion details
- Plan status updated: Phase 01 ✅ COMPLETED

Phase 01 of tier1-eslint-and-ccs-split plan complete.
Ready for Phase 02: CCS monolithic split (1071 → ~200 lines).
2025-11-27 17:23:43 -05:00
kaitranntt 0139333146 feat: set up quality gates for CCS TypeScript package
- Migrate package manager from npm to bun
- Add ESLint configuration with TypeScript support
- Add Prettier configuration and .prettierignore
- Format all TypeScript source files
- Update CLAUDE.md with bun instructions
- Verify 39 tests passing
2025-11-26 20:43:21 -05:00