Closed keyz closed 10 months ago
Friendly bump @isaacs
Sorry, been a busy holiday season, just getting back to it.
I think the only suggestion I have right now is it should maybe be called "project" to match the setting in ts-node and tsc? What do you think?
Sounds good to me! Gonna update the PR in a bit
Thanks @isaacs! I updated the file existence check, but I'm gonna defer the test/tsconfig.ts
to you if that's ok -- think that might require a few changes to the test setup.
Related: #38
This PR adds a new
project
config for tshy to extend from. With this new option, you can have separate tsconfigs for typechecking (linting) and compilation, where tshy will only be using the compilation config. Let me know how you feel about this approach!Why?
It's common to have multiple tsconfig files co-exist in a project, where:
tsconfig.json
contains"noEmit": true
and"include": ["**/*.ts"]
. This is used by typechecking and type-awaretypescript-eslint
; VSCode also picks up this file by default.tsconfig.build.json
for compilation, invoked viatsc -p tsconfig.build.json
(or TypeScript project references in a monorepo).Here's a real-world monorepo example:
tsconfig.json
(default),tsconfig.build.json
, and type-aware eslint configtsconfig.build.json
,tsconfig.typecheck.json
, and the script to invoke compilation