fix(generators): wire lint+typecheck into pipeline and fix uncovered errors

The turbo/generators package shipped without `lint` or `typecheck` scripts,
so `pnpm lint` / `pnpm typecheck` at the root silently skipped it. This
masked 2 ESLint errors (unused imports) and 11 TypeScript errors (relative
imports missing the `.js` extension required by `moduleResolution: NodeNext`,
plus JSON imports missing the `with { type: "json" }` attribute).

- Add `lint` and `typecheck` scripts to turbo/generators/package.json so the
  turbo pipeline picks them up (lint: 14/14, was 13/13).
- Add `.js` extensions to 7 relative imports across config.test.ts,
  lib/core-package-utils.test.ts, lib/snapshot.test.ts, and the 4 e2e tests.
- Add `with { type: "json" }` attributes to 4 snapshot JSON imports in the
  e2e tests.
- Remove unused `existsSync` and `splicePluginImportsAt` imports from
  lib/core-package-utils.test.ts.
- Declare `@repo/core-typescript` + `typescript` devDependencies so the
  generators package can run `tsc --noEmit` for typecheck.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-11 08:09:17 +02:00
parent e9d0356bc1
commit b593bea8ca
9 changed files with 22 additions and 14 deletions

6
pnpm-lock.yaml generated
View File

@@ -751,6 +751,12 @@ importers:
'@repo/core-eslint':
specifier: workspace:*
version: link:../../packages/core-eslint
'@repo/core-typescript':
specifier: workspace:*
version: link:../../packages/core-typescript
typescript:
specifier: ^5.8.0
version: 5.9.3
vitest:
specifier: ^3.1.0
version: 3.2.4(@types/debug@4.1.13)(@types/node@25.5.2)(happy-dom@20.8.9)(jiti@2.6.1)(jsdom@25.0.1)(lightningcss@1.32.0)(sass@1.99.0)(terser@5.46.2)(tsx@4.21.0)