microsoft / tsdoc

A doc comment standard for TypeScript
https://tsdoc.org/
MIT License
4.7k stars 130 forks source link

Make tsdoc.json visible from upper directories #304

Open crystalfp opened 2 years ago

crystalfp commented 2 years ago

I have a single project split in various pieces, each in a subdirectory of the project top directory. Currently, to use typedoc and eslint-plugin-tsdoc, I need to copy the configuration file tsdoc.json in each subdirectory. Is it possible to have the above mentioned tools "climb" the directory hierarchy till a tsdoc.json file is found? Thanks! mario

crystalfp commented 2 years ago

Non nice, but solved.

I put the common tsdoc.json file in the upper project directory. Then in each subdirectory I put a tsdoc.json file with this content:

{
    "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json",
    "extends": ["../tsdoc.json"]
}