This is a boilerplate module for a project that uses TypeScript as its main language. To use this boilerplate, clone, delete .git folder and begin your own. Maybe delete a few other extra files as necessary.
git clone https://github.com/alexgorbatchev/typescript-module-boilerplate.git
cd typescript-module-boilerplate
npm install
Rename and edit files as needed.
- Linting via ESLint.
- Run manually via
npm run lint. - Integrates with Visual Studio Code via vscode-eslint.
- Uses AirBNB ESLint plugin.
- TypeScript support via typescript-eslint-parser.
- Run manually via
- Formatting via Prettier.
- Run manually via
npm run format. - Integrates well with Visual Studio Code via prettier-vscode.
- Set
"editor.formatOnSave": trueto automatically format files on save.
- Set
- Run manually via
import/exportstatements are verified via eslint-plugin-import.
npm run test-- Runs tests, lint and build.npm run lint-- Runs ESLint.npm run format-- Reformats all of the.tsand.tsxfiles with Prettier.npm run build-- Regenerateslibfolder that gets included into NPM module.
MIT
