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

Allow extends property in tsconfig.json files #85

Merged
merged 1 commit into from
Jun 24, 2024

Conversation

elliotgoodrich
Copy link
Owner

tsc supports tsconfig.json files having an extends property, which references another JSON file that can contain additional properties that will be used.

Update parseOutput.mts to output the list of config files as part of the dyndep file so we will re-typecheck/transpile whenever the config file is updated. Note that is is not perfect - it will break if you change any option that controls the number or paths of the output files, or you add/remove additional files in extends. However, if you are changing warning levels or anything to do with typechecking it should work well.

Additionally, use the parser inside typescript instead of JSON.parse as the format is jsonc (JSON with comments) and not pure JSON.

`tsc` supports `tsconfig.json` files having an `extends` property, which
references another JSON file that can contain additional properties that
will be used.

Update `parseOutput.mts` to output the list of config files as part of
the `dyndep` file so we will re-typecheck/transpile whenever the config
file is updated.  Note that is is not perfect - it will break if you
change any option that controls the number or paths of the output files,
or you add/remove additional files in `extends`.  However, if you are
changing warning levels or anything to do with typechecking it should
work well.

Additionally, use the parser inside `typescript` instead of `JSON.parse`
as the format is `jsonc` (JSON with comments) and not pure JSON.
@elliotgoodrich elliotgoodrich merged commit 0cebc1e into main Jun 24, 2024
11 checks passed
@elliotgoodrich elliotgoodrich deleted the allow-extends-in-tsc branch June 24, 2024 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant