@ts-dev-tools/core
Version:
TS dev tools Core
94 lines (58 loc) โข 2.97 kB
Markdown
[](https://escemi-tech.github.io/ts-dev-tools/)
[](https://www.npmjs.com/package/@ts-dev-tools/core) [](https://github.com/escemi-tech/ts-dev-tools/actions?query=workflow%3A%22Continuous+Integration%22) [](https://codecov.io/gh/escemi-tech/ts-dev-tools) [](CONTRIBUTING) [](https://github.com/sponsors/neilime) [](https://github.com/escemi-tech/ts-dev-tools)
# Welcome to @ts-dev-tools/core ๐
## Common Typescript dev tools
---
## What's included
### ๐ฆ Package scripts
- `test`: Run tests with [Vitest](https://vitest.dev/)
- `format`: Format code with [Biome](https://biomejs.dev/)
- `lint`: Run linter with [Biome](https://biomejs.dev/)
- `check`: Run Biome checks and apply safe fixes
- `prepare`: Self install / update
### โก Git hooks
#### `pre-commit`
- Run [Biome](https://biomejs.dev/) checks against staged git files
#### `commit-msg`
- Lint [conventional commit](https://github.com/conventional-changelog/commitlint/tree/master/@commitlint/config-conventional) message with [commit-lint](https://conventional-changelog.github.io/commitlint/)
#### `pre-push`
- Run linter
- Execute Typescript compiler with [tsc](https://www.typescriptlang.org/docs/handbook/compiler-options.html)
- Run tests
### ๐ Code quality
- Install and configure [Biome](https://biomejs.dev/) for linting and formatting
- Enable Biome recommended rules and VCS integration
- Organize imports with Biome assist actions
### ๐งช Tests
- Install and configure [Vitest](https://vitest.dev/)
- Install and configure [@vitest/coverage-v8](https://www.npmjs.com/package/@vitest/coverage-v8) for coverage reports
### ๐ Types
- [@types/node](https://www.npmjs.com/package/@types/node)
- [vitest/globals](https://vitest.dev/config/#globals)
---
## Usage
### _1_. Install
```sh
npm install --save-dev @ts-dev-tools/core
```
Or
```sh
yarn add --dev @ts-dev-tools/core
```
Or
```sh
pnpm add -D @ts-dev-tools/core
```
### _2_. Enable ts-dev-tools
```sh
npm exec ts-dev-tools install
```
Or
```sh
yarn ts-dev-tools install
```
Or
```sh
pnpm ts-dev-tools install
```
โ ๏ธ If your package is using yarn, is not private and you're publishing it on a registry like npmjs.com, you need to disable postinstall script using [pinst](https://github.com/typicode/pinst). Otherwise, postinstall will run when someone installs your package and result in an error.