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.
- TypeScript
- Jest
- Prettier
- ESLint
$ git clone https://github.com/alexgorbatchev/typescript-module-boilerplate.git
$ cd typescript-module-boilerplate
$ rm -fr .git
$ yarn
$ yarn test
- Linting via ESLint.
- Run manually via
yarn lint
. - Integrates with Visual Studio Code via vscode-eslint.
- Highlights type & linting issues.
- Provides debuging options for running Jest tests (once and in watch mode).
- Uses AirBNB ESLint plugin as sane defaults.
import ... from ...
statements are verified for correctness via eslint-plugin-import.
- Run manually via
- Formatting via Prettier.
- Run manually via
yarn format
. - Integrates well with Visual Studio Code via prettier-vscode.
- Automatically formats on save.
- Run manually via
yarn test
-- Runs tests.yarn typecheck
-- Checks TypeScript types for correctness. This is disabled during tests for performance reasons.yarn lint
-- Runs linting.yarn format
-- Reformats all of the.ts
and.tsx
files with Prettier.yarn build
-- Regeneratesdist
folder that gets included into NPM module.
MIT