Shared TypeScript config for projects.
npm install --save-dev @codennnn/tsconfig
For example, if you are using Next.js project, edit your tsconfig.json
like this:
{
"extends": "@codennnn/tsconfig/next.json"
}
This config above requires TypeScript 4.7 or later. You can find the code here.
When you are targeting a higher version of Node.js, check the relevant ECMAScript version and add it as target
:
{
"extends": "@codennnn/tsconfig",
"compilerOptions": {
"outDir": "dist",
"target": "ES2021"
}
}