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": true
to automatically format files on save.
- Set
- Run manually via
import/export
statements 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.ts
and.tsx
files with Prettier.npm run build
-- Regenerateslib
folder that gets included into NPM module.
MIT