Skip to content

Add static analysis: type checking, ESLint, and Prettier#152

Merged
jakebromberg merged 8 commits intomainfrom
feature/static-analysis
Feb 13, 2026
Merged

Add static analysis: type checking, ESLint, and Prettier#152
jakebromberg merged 8 commits intomainfrom
feature/static-analysis

Conversation

@jakebromberg
Copy link
Member

@jakebromberg jakebromberg commented Feb 12, 2026

Summary

  • Add tsc --noEmit type checking across all workspaces, catching and fixing ~10 type errors that were silently passing through tsup/esbuild
  • Add ESLint 9 with TypeScript type-checked rules, eslint-plugin-security, and eslint-config-prettier (0 errors, 130 warnings for gradual cleanup)
  • Add Prettier configuration and normalize all existing code formatting
  • Add typecheck, lint, and format:check steps to CI workflow before the build step

Changes

Commit Description
feat: add typecheck scripts and fix type errors Add tsc --noEmit to all workspaces. Fix type errors: deprecated bearerClient import, IFSEntry interface conflict, LRUCache generics, drizzle-orm return types, internal path imports
feat: add ESLint with TypeScript type-checked rules and security plugin ESLint 9 flat config with recommendedTypeChecked, security plugin, prettier compat. Fix async safety errors (floating promises, misused promises), useless escapes
chore: add Prettier configuration .prettierrc.json (single quotes, trailing commas, 120 char width) and .prettierignore
style: format codebase with Prettier 88 files reformatted (no logic changes)
ci: add typecheck, lint, and format steps to CI workflow Three new steps in lint-and-typecheck job
docs: add code quality commands to README Code Quality section, fix unit tests for metadata nesting

New Commands

npm run typecheck      # Type check all workspaces
npm run lint           # Run ESLint
npm run lint:fix       # Run ESLint with auto-fix
npm run format         # Format with Prettier
npm run format:check   # Verify formatting (CI)

Test plan

  • npm run typecheck passes with 0 errors
  • npm run lint passes with 0 errors (130 warnings acceptable)
  • npm run format:check passes
  • npm run build passes
  • npm run test:unit passes (113/113 tests)
  • CI workflow runs all new steps successfully

Jake Bromberg added 7 commits February 12, 2026 18:14
Add `tsc --noEmit` typecheck scripts to all workspace package.json files
and a root orchestrator that builds shared packages first for correct
module resolution.

Type error fixes:
- Remove deprecated bearerClient import (better-auth 1.4.x)
- Remove IFSEntry entry_type override that conflicted with FSEntry enum
- Cast session.user for admin plugin ban fields
- Fix LRUCache generics to satisfy `V extends {}` constraint
- Use nullish coalescing for nullable-to-non-nullable transforms
- Access metadata fields through entry.metadata in V2 transform
- Replace db.execute().rows with direct cast (drizzle-orm 0.41)
- Replace internal database path import with @wxyc/database
- Cast DiscogsService for pipeline interface compatibility
- Add missing project reference in authentication tsconfig
- Generalize .gitignore tsbuildinfo pattern
Configure ESLint 9 flat config with typescript-eslint recommendedTypeChecked,
eslint-plugin-security, and eslint-config-prettier. Fix all lint errors
(async safety, useless escapes) while keeping warnings for gradual cleanup.
Add .prettierrc.json and .prettierignore with format and format:check
scripts. Configured to match existing code style (single quotes,
trailing commas, 120 char line width).
Run prettier --write . to normalize all existing code formatting.
No logic changes, only whitespace and quote style adjustments.
Add three new steps before the build step in lint-and-typecheck job:
tsc --noEmit for type checking, eslint for linting, and prettier
--check for formatting verification.
Add Code Quality section documenting typecheck, lint, lint:fix, format,
and format:check scripts. Fix unit tests to match IFSEntry metadata
nesting structure.
Use optional chaining when accessing entry.metadata since getPlaylist
returns raw FSEntry objects without metadata joins. This fixes a 500
error on the V2 playlist endpoint.
@jakebromberg jakebromberg requested a review from AyBruno February 13, 2026 02:25
@jakebromberg jakebromberg force-pushed the feature/static-analysis branch from 7507479 to dc7f6ec Compare February 13, 2026 02:36
@jakebromberg jakebromberg merged commit 406aaec into main Feb 13, 2026
4 checks passed
@jakebromberg jakebromberg deleted the feature/static-analysis branch February 13, 2026 03:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants