Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kamesuta/nodejs-typescript-eslint-template
Robust TypeScript Template with eslint for Node.js. It is ready to be used with VSCode, that allows you to run and debug your code with just F5
https://github.com/kamesuta/nodejs-typescript-eslint-template
eslint esmodules husky nodejs prettier typescript vscode
Last synced: 2 days ago
JSON representation
Robust TypeScript Template with eslint for Node.js. It is ready to be used with VSCode, that allows you to run and debug your code with just F5
- Host: GitHub
- URL: https://github.com/kamesuta/nodejs-typescript-eslint-template
- Owner: Kamesuta
- License: mit
- Created: 2023-09-02T17:54:46.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-09T01:19:42.000Z (5 months ago)
- Last Synced: 2024-06-09T02:29:00.687Z (5 months ago)
- Topics: eslint, esmodules, husky, nodejs, prettier, typescript, vscode
- Language: JavaScript
- Homepage:
- Size: 149 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Robust TypeScript Template with eslint for Node.js
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.## Features
- **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` and `export` statements instead of `require` and `module.exports`.## How to use
To use this template, you need to have Node.js installed on your machine. Then, follow these steps:
1. Clone this repository or download it as a ZIP file.
2. Run `npm install` to install the dependencies.
3. Run `npm run start` to run your code.
4. Edit the files in the `src` folder as you wish.
5. Run `npm run build` to compile your code into the `dist` folder.
6. Run `npm run lint` to check your code for errors.
7. Run `npm run prettier` to format your code automatically.