Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(tsconfig.json): Allow extends: to be array #48437

Closed
5 tasks done
frank-dspeed opened this issue Mar 26, 2022 · 6 comments
Closed
5 tasks done

feat(tsconfig.json): Allow extends: to be array #48437

frank-dspeed opened this issue Mar 26, 2022 · 6 comments
Labels
Duplicate An existing issue was already created

Comments

@frank-dspeed
Copy link

Suggestion

Allow tsconfig.json property extends: to be array. with merge from right to left Behavior.

🔍 Search Terms

tsconfig.json, extends, extend multiple configs, compose tsconfig, composite, monorepo, large scale project, code reuse.

✅ Viability Checklist

My suggestion meets these guidelines:

  • This wouldn't be a breaking change in existing TypeScript/JavaScript code
  • This wouldn't change the runtime behavior of existing JavaScript code
  • This could be implemented without emitting different JS based on the types of the expressions
  • This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
  • This feature would agree with the rest of TypeScript's Design Goals.

⭐ Suggestion

Allow tsconfig.json property extends: to be array. with merge from right to left Behavior.

📃 Motivating Example

it allows me to reduce all kind of how should i call them entryPoints with diffrent extend chains into a more clean reuseable concept
at present i create large folder structures only for my tsconfig files that link each other with diffrent defaults for diffrent module situations that i handle programaticaly but i found out that i could reduce all that into simple arrays and all would benefit from that.

the current situation:

tsconfig.node12.extended-compat.json

{ extends: './tsconfig.node12.no-compat.json' }

now imagin 900 + files for that with diffrent sets of compiler options only to unify and link single sets of tsconfig defaults for diffrent situations. you can expect that we replicate the complete matrix of possible tsconfig settings + 1 file at last per project (composit) that uses many up to 5 files that extend each other. and this sets of each 5 files exist in N configuration sets with diffrent mixed options.

i can reduce all that with a single collection of indipendent settings per set and then write

tsconfig.json

{ // Project tsconfig that only references the used config sets.
  extends: ["tsconfig.node12.no-compat.json", "tsconfig.node12.extended-compat.json"] 
} 

💻 Use Cases

I want to use it to make consumption of typescript projects more easy as also implement it in the rollup loader to test if i can get types with diffrent settings it would simply reduce the amount of dump entryPoint files needed so it would enable users with big repos to write more solid configs.

@MartinJohns
Copy link
Contributor

Duplicate of #29118. Used search terms: extends array in:title

@frank-dspeed
Copy link
Author

@MartinJohns good spotted! but i keep that open till @weswigham did reconsider and answered on #29118. i commented there now thanks for spotting that.

@frank-dspeed
Copy link
Author

@MartinJohns ok it looks like you would not agree with the process do you got a other way that you can teach me to bump issues up that got now more related then before? New issues are always better visible then the old once because the old once are cluttered most time. Also they could be on filter lists and so on. You should not fear this additional issue it will algin nice in any graph and also will produce good stats for any team member that handels it! Also i would even implement it my self so this issue can directly link the PR if i should do that.

i hope that makes some sense to you i only wanted to explain my reasoning a bit.

@RyanCavanaugh RyanCavanaugh added the Duplicate An existing issue was already created label Mar 28, 2022
@RyanCavanaugh
Copy link
Member

New issues are always better visible then the old once because the old once are cluttered most time. Also they could be on filter lists and so on

The time we spend triaging new (duplicate) issues is time we spend not implementing/planning/evaluating popular feature requests like the one this is a duplicate of.

@frank-dspeed
Copy link
Author

@RyanCavanaugh maybe you should consider to put some labels in a "good first issue" queue so that Contributors can catch up and implement that as they know it will get merged.

@RyanCavanaugh
Copy link
Member

We have a "Good First Issue" label

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

3 participants