Is your feature request related to a problem? Please describe.
The doc-check command compiles Typescript snippets in Markdown files but doesn't enforce the linting rules.
Describe the solution you'd like
Modify the doc-check command to also lint the TS snippets according to the tsconfig.json
See libp2p/js-libp2p#1505 (comment) for more context