React module TypeScript configuration
The @monorepo-template/react-module-tsconfig
package contains production-ready
TypeScript configurations for React modules. It extends the
monorepo template TypeScript configuration
by adding React-specific compiler options, such as JSX support, type
declarations, and more.
Install
yarn add --dev "@monorepo-template/react-module-tsconfig" "@types/jest"
Use
Change your tsconfig.json
file to extend this preconfiguration:
{
"extends": "@monorepo-template/react-module-tsconfig"
}
If you do not want your module to use the React 17 JSX transform, extend this preconfiguration instead:
{
"extends": "@monorepo-template/react-module-tsconfig/no-jsx-runtime"
}
Change your tsconfig.development.json
file to extend this preconfiguration:
{
"extends": "@monorepo-template/react-module-tsconfig/development"
}
Change your tsconfig.eslint.json
file to extend this preconfiguration:
{
"extends": "@monorepo-template/react-module-tsconfig/eslint"
}