Skip to content

Modernize TypeScript example with Vitest and ESLint 9#97

Open
josegarrera wants to merge 8 commits intosandromancuso:masterfrom
josegarrera:fix/typescript-issues
Open

Modernize TypeScript example with Vitest and ESLint 9#97
josegarrera wants to merge 8 commits intosandromancuso:masterfrom
josegarrera:fix/typescript-issues

Conversation

@josegarrera
Copy link
Copy Markdown

Summary

  • Upgrade TypeScript from 2.x to 5.7 with strict mode
  • Replace Jest with Vitest 3.x for faster testing
  • Replace deprecated TSLint with ESLint 9 (flat config)
  • Update tsconfig.json for modern ES2022 target
  • Update README with current Node.js requirements

Changes

  • Dependencies: TypeScript ~5.7.2, Vitest ~3.0.0, ESLint ~9.17.0, typescript-eslint ~8.18.0
  • Removed: jest, ts-jest, tslint, @types/jest
  • Config: ESM modules enabled, strict TypeScript, Vitest globals

Test Plan

  • npm install succeeds
  • npm run lint passes
  • npm run typecheck passes
  • npm test runs (placeholder test fails intentionally as kata setup)

- Delete tslint.json (TSLint deprecated since 2019)
- Add eslint.config.js with flat config format
- Configure @typescript-eslint for TypeScript support
- Add vitest.config.ts with globals enabled
- Configure test file pattern for test directory
- Replace Jest with Vitest ~3.0.0
- Upgrade TypeScript from 2.x to ~5.7.2
- Add ESLint ~9.17.0 with typescript-eslint ~8.18.0
- Remove deprecated jest, ts-jest, tslint, @types/jest
- Add ESM support with "type": "module"
- Update npm scripts for new tooling
- Target ES2022 with ESNext modules
- Enable strict mode for better type safety
- Use bundler module resolution
- Include test directory in compilation
- Rename output directory from built to dist
Vitest globals are enabled in config, no import needed
- Update Node.js requirement to 20+ LTS
- Document new npm scripts for Vitest and ESLint
- Add underscore prefix to unused parameter in TripDAO
- Configure ESLint to ignore underscore-prefixed args
- Add vitest/globals types to tsconfig
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.

1 participant