Closed Ethan-Arrowood closed 10 months ago
Hey @Ethan-Arrowood, I've run this by a few people and the feedback is that we should focus on the lib/target versions for TypeScript and Node.js. The other settings make assumptions about the build system, which can vary greatly between projects (even our own). Instead can make use of shared monorepo configs, as you pointed out that vercel/vercel
does with @vercel-internals/tsconfig
.
How would you feel about updating this PR to focus on Node versions instead? As an example:
Probably 16/18/20 would be enough for us, as we probably don't want to support anything older nor anything non-LTS.
Alright, take a look!
:tada: This PR is included in version 5.2.0-canary.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
@Ethan-Arrowood @mrmckeb In https://github.com/vercel/style-guide/blob/canary/typescript/tsconfig.node20.json, according to the doc: https://www.typescriptlang.org/tsconfig#lib
es2023
is not a valid value for lib
and target
, and TS does complain about that when using this TS config. Maybe it should be changed to esnext
for now? However, I imagine we need to keep monitoring the status and change it to es2023
once it is available, since esnext
will target es2024
by that time.
:tada: This PR is included in version 5.2.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Adds more tsconfigs.
Why do
node20
andnode20-esm
use the samelib
andtarget
asnode18
?Closes #59