Skip to content

2026-08-27 Monorepo complexity and import linters

Added passing complexity ceilings and targeted Python architecture contracts to mono.

Work Done

  • Added pinned Oxlint cyclomatic-complexity checks to every TypeScript project, using each project’s measured current maximum as its initial ceiling.
  • Enabled Ruff C901 across all ten Python projects with passing project-specific ceilings, repaired vxdata-api Ruff discovery, and added the missing dashboard-api lint target.
  • Wired complexity checks into Nx lint tasks and focused Lefthook pre-commit commands.
  • Added Import Linter contracts for vxdata-api layers and protected CRUD internals, plus the vxdata-sdk to vxdata-schemas dependency direction.
  • Created mono commits 7f534eb3 and 6ae3b053; all TypeScript/Python lint targets and module-boundary checks passed.

Lessons Learned: Pitfalls

  • Three projects still had Pixi v6 locks. Putting Ruff-only settings in their pyproject files forced noisy lock-format upgrades, so small ruff.toml files extending the existing pyproject configuration avoided unrelated lock churn.
  • Enabling real Ruff discovery in vxdata-api exposed two stale unused imports that its previous include = ["src"] configuration had hidden.
  • dashboard-frontend’s existing Biome script has a large pre-existing backlog, so its new Nx lint target runs the requested complexity check without making those unrelated diagnostics part of this change.

Lessons Learned: Improvements

  • New Python project scaffolding should create a valid Ruff source pattern, select C901, and provide Nx and Lefthook lint coverage from the start.
  • Complexity ceilings should be lowered project by project as current outliers are refactored; the configured values now provide explicit no-regression baselines.
Navigation

Type to search…

↑↓ navigate↵ selectEsc close