A minimal boilerplate for starting TypeScript projects with testing and linting tools.
- TypeScript: Write strongly-typed JavaScript.
- Jest: Fast and feature-rich testing framework.
- ESLint: Static code analysis to catch errors.
- Prettier: Consistent code formatting.
- Node.js: v20 or newer.
- Yarn: Installed globally.
yarn
-
Execute all tests:
yarn test
-
Watch files and re-run tests on changes:
yarn test:watch
-
Check for linting issues:
yarn lint
-
Fix linting issues:
yarn lint --fix
- Adjust node version:
Preferences
->Languages & Frameworks
->Node.js and NPM
and set theNode interpreter
to the path of your Node.js installation.
Command | Description |
---|---|
yarn test |
Run all tests. |
yarn test:watch |
Run tests in watch mode. |
yarn lint |
Check for linting issues. |
yarn lint --fix |
Fix linting issues automatically. |
tdd-ts/
├── src/ # Source code
├── test/ # Test files
├── .eslintignore # Files to ignore during linting
├── eslint.config.js # ESLint configuration
├── jest-config.json # Jest configuration
├── tsconfig.json # TypeScript configuration
├── package.json # Project metadata and scripts
└── README.md # Documentation
This project is licensed under the MIT License.