A strict tsconfig for TypeScript projects.
Note: this repo is still experimental. It may not work correctly and breaking changes should be expected before version 1.
Install from NPM, including peer dependencies, with --save-dev
npm i @nick-mazuk/tsconfig typescript --save-dev
Then, create a tsconfig.json
file in the root of your project with
{
"extends": "@nick-mazuk/tsconfig/tsconfig.json",
"include": ["**/*.ts", "*.ts"], // add other files to include here
"exclude": ["node_modules"]
}
This package has configs for different scenarios (more coming).
Version | extends | includes |
---|---|---|
NextJS | @nick-mazuk/tsconfig/next |
["next-env.d.ts", "**/*.ts", "**/*.tsx", "pages/_app.tsx", "error.tsx.config"] |
When using a more specific config, the base config is not needed. For instance, with NextJS, this is all that's required:
{
"extends": "@nick-mazuk/tsconfig/next.json",
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "pages/_app.tsx", "error.tsx.config"],
"exclude": ["node_modules"]
}