isaacs / tshy

Other
894 stars 18 forks source link

Allow user to specify a custom project (tsconfig path) #43

Closed keyz closed 10 months ago

keyz commented 10 months ago

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:

Here's a real-world monorepo example:

keyz commented 10 months ago

Friendly bump @isaacs

isaacs commented 10 months ago

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?

keyz commented 10 months ago

Sounds good to me! Gonna update the PR in a bit

keyz commented 10 months ago

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.