This is a template for creating robust and reliable TypeScript projects with Node.js.
It is ready to be used with VSCode, which allows you to run and debug your code with ease.
It also uses eslint and prettier to enforce strict coding standards and format the code automatically.
Moreover, it runs linting and formatting on every commit to ensure consistent and safe code quality.
- VSCode ready feature that allows you to run and debug your code with just F5. You can also use breakpoints to inspect your code. There is also a launch configuration for terminal debugging if you need console input.
- eslint is configured with strict rules to help you write robust code.
- It has auto-fix feature that will fix your code for quotation marks, spaces after comments, etc.
- It requires you to write return types and JsDoc comments for better readability and documentation.
- prettier will format your code automatically according to the predefined style.
- husky and lint-staged will run linting and formatting on every commit, so you can always commit safe code.
- Common features such as logging and configuration are already implemented for your convenience.
- Simple and minimal design that only uses log and config as the basic libraries. You can easily extend the template with your own dependencies and features.
- ESM import syntax is enabled by default, so you can use
import
andexport
statements instead ofrequire
andmodule.exports
.
To use this template, you need to have Node.js installed on your machine. Then, follow these steps:
- Clone this repository or download it as a ZIP file.
- Run
npm install
to install the dependencies. - Run
npm run start
to run your code. - Edit the files in the
src
folder as you wish. - Run
npm run build
to compile your code into thedist
folder. - Run
npm run lint
to check your code for errors. - Run
npm run prettier
to format your code automatically.