This template gets you started with:
- TypeScript (setup for node v16, building & dev commands)
- Linting (ESLint)
- Code styling (Prettier)
- Pre-commit hooks with Husky (lint-staged for ESLint & Prettier, conventional commits)
- GitHub Actions (Linting, Testing, Codecov, Building)
- Dockerfile
- Testing (Jest) Some configs are highly opinionated (such as renovate) and set for our organizational needs, you might want to go through them first.
What is not included:
- Versioning
- Releasing
- Environment variables/configs
Create a new GitHub repo from this template.
Clone the project locally:
git clone https://github.com/kordis-leitstelle/node-ts.git
Go to the project directory:
cd node-ts
Install dependencies:
npm i
- If you want to use renovates automerge for < major dependency updates:
- In the GitHub repository settings, go to
Option
and activate at leastAllow auto-merge
andAutomatically delete head branches
image. - In the GitHub repository settings, go to
Branches
and add a branch protection rule for your main branch. ActivateRequire status checks to pass before merging
andRequire branches to be up to date before merging
.
- In the GitHub repository settings, go to
- See if configs fit your requirements.
- Check if your target platform supports the language targets and configurations in the
tsconfig
. The targets are set to be 100% compatible with Node v16 (ES2021, ESM...)
Start the developing script:
npm run start:dev
Start the developing script:
npm run lint
npm run lint:fix # if you want to apply the linting rules right away
npm run test