Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/davidjenni/typescriptemptyproj
Template project for TypeScript, using jest, prettier, eslint
https://github.com/davidjenni/typescriptemptyproj
eslint jest nodejs typescript vscode
Last synced: about 17 hours ago
JSON representation
Template project for TypeScript, using jest, prettier, eslint
- Host: GitHub
- URL: https://github.com/davidjenni/typescriptemptyproj
- Owner: davidjenni
- Created: 2020-03-03T04:48:03.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-10-18T01:06:32.000Z (12 months ago)
- Last Synced: 2024-04-15T06:43:49.773Z (6 months ago)
- Topics: eslint, jest, nodejs, typescript, vscode
- Language: TypeScript
- Homepage:
- Size: 466 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TypeScript Empty Project
[![PullRequest](https://github.com/davidjenni/TypeScriptEmptyProj/actions/workflows/PullRequest.yml/badge.svg)](https://github.com/davidjenni/TypeScriptEmptyProj/actions/workflows/PullRequest.yml)
Template project for TypeScript, containing basic npm run scripts to transpile src and test trees and run jest tests
The contents of this repo can be used to green-field populate your own TS based project;
it provides out of the box (after an initial `npm ci` call to restore the depencencies):- CI (`npm run ci`): rebuild, test (with code coverage), lint the code base
- build (`npm run build`): transpiles all TS sources and tests into /dist folder
- test (`npm test` or `npm run test`): run all tests
- lint (`npm run lint`): check for problematic code patterns using eslint
- check: (`npm run check`): check for consistent source formatting, using prettier
- prettier (`npm run prettier`): re-format all sources to address issues found with `npm run check`.
Note that by default, VSCode will run the same formatting rules, see: `.vscode/settings.json` to disable that
- Tests can be debugged via `F5` from within an individual .test.ts file
- A Github Workflow is setup as PR loop## Setting Up Dev Environment
Windows, macOS or Linux:
- [Node.js LTS (currently v16)](https://nodejs.org/en/download/)
- [git](https://git-scm.com/downloads)
- [VS Code](https://code.visualstudio.com/Download) or your different favorite editor
- recommended VSCode extensions:
- [EditorConfig for VS Code (editorconfig.editorconfig)](https://github.com/editorconfig/editorconfig-vscode)
- [ESLint (dbaeumer.vscode-eslint)](https://github.com/Microsoft/vscode-eslint)
- [markdownlint (davidanson.vscode-markdownlint)](https://github.com/DavidAnson/vscode-markdownlint)
- [Prettier - Code formatter (esbenp.prettier-vscode)](https://github.com/prettier/prettier-vscode)## Getting Started
Clone, restore modules, build and run:
```bash
git clone https://github.com/davidjenni/TypeScriptEmptyProj.git
cd TypeScriptEmptyProj
npm ci
npm run ci
```