Skip to content
This repository has been archived by the owner on Aug 17, 2022. It is now read-only.

Recommend .tsconfig #225

Open
mxdvl opened this issue Jul 5, 2022 · 3 comments
Open

Recommend .tsconfig #225

mxdvl opened this issue Jul 5, 2022 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@mxdvl
Copy link
Contributor

mxdvl commented Jul 5, 2022

There are a few rules which are sadly no turned on by default, and it would be good to share a recommended .tsconfig for those interested.

For example:

  • strict: true
  • esModuleInterop: true
  • noUncheckedIndexedAccess: true

    This flag can be handy for catching out-of-bounds errors, but it might be noisy for a lot of code, so it is not automatically enabled by the strict flag; however, if this feature is interesting to you, you should feel free to try it and determine whether it makes sense for your team’s codebase!

@mxdvl mxdvl added the help wanted Extra attention is needed label Jul 5, 2022
@sndrs
Copy link
Member

sndrs commented Jul 11, 2022

Is it possible to consume this in projects? Would you have to extend from node_modules directly?

@mxdvl
Copy link
Contributor Author

mxdvl commented Jul 13, 2022

Is it possible to consume this in projects? Would you have to extend from node_modules directly?

It looks like you can extend from a package. TypeScript maintain a list of recommendations themselves: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html#tsconfig-bases

@sndrs
Copy link
Member

sndrs commented Aug 17, 2022

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants