@ts-dev-tools/react
Version:
TS dev tools for React
62 lines (38 loc) โข 2.7 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/react โ๏ธ
## Typescript dev tools for a [ReactJS](https://reactjs.org/) project
---
## What's included
### Inherit from [`@ts-dev-tools/core`](https://github.com/escemi-tech/ts-dev-tools/tree/main/packages/)
### ๐ Linter
- Enable `browser` env for [eslint](https://eslint.org/docs/user-guide/configuring#specifying-environments)
- Install and configure [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react)
### ๐งช Tests
- Install react tests libraries:
- [@testing-library/jest-dom](https://testing-library.com/docs/ecosystem-jest-dom): Custom jest matchers to test the state of the DOM
- [@testing-library/react](https://testing-library.com/docs/react-testing-library/intro/): Simple and complete React DOM testing utilities
- [@testing-library/react-hooks](https://react-hooks-testing-library.com/): Simple and complete React hooks testing utilities
- [react-test-renderer](https://www.npmjs.com/package/react-test-renderer/): React renderer required by `@testing-library/react-hooks`
### ๐ Types
- [@types/react](https://www.npmjs.com/package/@types/react)
- [@types/react-dom](https://www.npmjs.com/package/@types/react-dom)
---
## Usage
### _1_. Install
```sh
npm install --save-dev @ts-dev-tools/react
```
Or
```sh
yarn add --dev @ts-dev-tools/react
```
### _2_. Enable ts-dev-tools
```sh
npm exec ts-dev-tools install
```
Or
```sh
yarn 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.