1.0.2 • Published 1 year ago
@codecraftbr/ts-config v1.0.2
tsconfig
Shared TypeScript config for Next Ip projects
Integrate into new project
- Install this package as devDependency
# with Yarn
$ yarn add -D @codecraftbr/ts-config
# with npm
$ npm i -D @codecraftbr/ts-config
This config requires TypeScript 4.7 or later.
- Install peer dependencies of this package in your project as devDependencies
Therefore, you can make use of the tool install-peerdeps:
# with Yarn
$ yarn dlx install-peerdeps --dev @codecraftbr/ts-config
# with npm
$ npx install-peerdeps --dev @codecraftbr/ts-config
- Use Typescript config in your project
tsconfig.json
{
"extends": "@codecraftbr/tsconfig",
"compilerOptions": {
"baseUrl": "./",
"rootDir": ".",
"outDir": "dist",
},
"include": ["./src/**/*.ts", "./test/**/*.ts"]
}
When you are targeting a higher version of Node.js, check the relevant ECMAScript version and add it as target
:
{
"extends": "@codecraftbr/tsconfig",
"compilerOptions": {
"baseUrl": "./",
"rootDir": ".",
"outDir": "dist",
"target": "ES2021"
}
}