ChainSafe / lodestar

🌟 TypeScript Implementation of Ethereum Consensus
https://lodestar.chainsafe.io
Apache License 2.0
1.18k stars 289 forks source link

Fix yarn check-readme #6300

Open nflaig opened 10 months ago

nflaig commented 10 months ago

Maybe we should run yarn check-readme in CI along with tests to keep these readmes compile-able?

We actually do https://github.com/ChainSafe/lodestar/blob/88744d8a4877499c8c7aa43aeb4d576b98581faf/.github/workflows/test.yml#L144-L145

But it doesn't seem to care at all

~/projects/ethereum/lodestar/packages/light-client [unstable ≡ +0 ~1 -0 !]> yarn check-readme
yarn run v1.22.19
$ typescript-docs-verifier
ℹ Compiling documentation TypeScript code snippets from README.md
ℹ Found 1 TypeScript snippets
✔ All snippets compiled OK

@jeluard how did you verify and determine the changes to make it compile, just copy pasted it into a .ts file?

Originally posted by @nflaig in https://github.com/ChainSafe/lodestar/issues/6297#issuecomment-1892407830

jeluard commented 10 months ago

@nflaig yes just a plain copy

jeluard commented 10 months ago

Some findings:

matthewkeil commented 10 months ago

Nice catch!!! Your thoroughness is commendable @jeluard!!! It looks like we can pass a “—project” to the typescript-docs-verifier. Perhaps we have a tsconfig.docs.json with that set to false to make sure it runs correctly

philknows commented 3 weeks ago

@nflaig Any updates on your PR #6868 ?

nflaig commented 3 weeks ago

@nflaig Any updates on your PR #6868 ?

hmm there was no response on https://github.com/bbc/typescript-docs-verifier/issues/31 and the module we use seems unmaintained, maybe we just fork it? I haven't found an alternative