/generator-typescript-best-practices

Yeoman generator for scaffolding a typescript project

Primary LanguageJavaScript

generator-typescript-best-practices

generator-typescript-best-practices is a Yeoman generator for creating a TypeScript project with strict linting. This includes the following

  • commitlint to enforce conventional commits
  • husky for handling Git hooks. The following hooks are installed:
    • pre-commit hook for formatting staged code and verifying that commit messages adheres to conventional commits
    • pre-push hook for running linting and verifying test coverage
  • Prettier for formatting
    • import-sort for sorting imports as part of formatting process
  • Eslint for linting
  • lint-staged for only linting staged files to avoid formatting whole project as part of pre-commit hook
  • Standard Version for automated releases
  • TypeScript if not already installed

Scaffolding a project

Before using this generator, the NPM package must be installed on the local machine. A global install can be accomplished using

npm i -g generator-typescript-best-practices

To scaffold an existing project, navigate to a TypeScript repository where Git and NPM already have been initialized and run

npx yo typescript-best-practices

Contributing

See the contribution guide.