@loja-integrada/typescript-config
v0.0.4
Published
This package provides a shared TypeScript configuration for front-end projects at Loja Integrada.
Downloads
183
Keywords
Readme
Typescript Config
This package provides a shared TypeScript configuration for front-end projects at Loja Integrada.
Usage
Installation
Install the package using your package manager:
npm install @loja-integrada/typescript-config --save-dev
yarn add @loja-integrada/typescript-config -D
pnpm add @loja-integrada/typescript-config -DConfigure
Versions available:
- For components library, use
@loja-integrada/typescript-config/react-library.json; - For Nextjs application, use
@loja-integrada/typescript-config/nextjs.json; - Other projects, use
@loja-integrada/typescript-config/base.json.
Create a tsconfig.json file in the root of your project with the following content:
{
"extends": "@loja-integrada/typescript-config/nextjs.json",
"compilerOptions": {
"paths": {
"@/*": ["./src/*"],
"@/public/*": ["./public/*"]
}
},
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts",
".next/dev/types/**/*.ts",
"next.config.ts"
],
"exclude": ["./out/**/*", "./node_modules/**/*", "**/*.cy.ts"]
}