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
docs: npm run tsc -> npx tsc #6978
Conversation
According to this page, you should run `npm run tsc` to run `tsc` and do a type check. However, in the package.json file for Docusaurus version 2.0.0-beta.17 the command is actually `npm run typecheck`, which runs `tsc`. This update only replaces `tsc` with `typecheck` so the npm script will run correctly.
Hi @jadonn! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
✅ [V2]Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site settings. |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-6978--docusaurus-2.netlify.app/ |
Not every project has the |
That is a great suggestion to use |
Based on feedback for the original change to replace `npm run tsc` with `npm run typecheck`, a better solution that was suggested was to use npx to run tsc instead of an npm script. `npx tsc` should work regardless of the template/presets you installed when you installed Docusaurus.
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks!
According to the page generated from website/docs/typescript-support.md, you should run
npm run tsc
to runtsc
to do a type check. However, in the package.json file for Docusaurus version 2.0.0-beta.17 the command is actuallynpm run typecheck
, which runstsc
.This update only replaces
tsc
withtypecheck
so the npm script will run correctly.Motivation
This is a very small but inconvenient typo. I wanted to save others the trouble of the docs having a wrong command.
This typo does not appear to be corrected in the next version of the documentation website either.
Have you read the [Contributing Guidelines on pull requests]
I have read the community guidelines on pull requests. I hope I have followed them correctly for what I hope is a simple fix.
Test Plan
There should not need to be a test plan since this is a documentation change of a single word on a single line and should not have any impact on functionality.
Related PRs
No other PRs related to this request as far as I could find.