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

docs: npm run tsc -> npx tsc #6978

Merged
merged 2 commits into from Mar 24, 2022
Merged

docs: npm run tsc -> npx tsc #6978

merged 2 commits into from Mar 24, 2022

Conversation

jadonn
Copy link
Contributor

@jadonn jadonn commented Mar 24, 2022

According to the page generated from website/docs/typescript-support.md, you should run npm run tsc to run tsc to 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.

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.

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.
@facebook-github-bot
Copy link
Contributor

Hi @jadonn!

Thank you for your pull request and welcome to our community.

Action Required

In 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.

Process

In 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 CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@netlify
Copy link

netlify bot commented Mar 24, 2022

[V2]

Built without sensitive environment variables

Name Link
🔨 Latest commit 87b2ab5
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/623bca63ce0ce90008bd24f2
😎 Deploy Preview https://deploy-preview-6978--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions
Copy link

github-actions bot commented Mar 24, 2022

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟠 Performance 52
🟢 Accessibility 100
🟢 Best practices 92
🟢 SEO 100
🟢 PWA 90

Lighthouse ran on https://deploy-preview-6978--docusaurus-2.netlify.app/

@Josh-Cena
Copy link
Collaborator

Not every project has the "typecheck": "tsc" alias. I'd rather use npx tsc so it works for everybody

@jadonn
Copy link
Contributor Author

jadonn commented Mar 24, 2022

That is a great suggestion to use npx tsc in that line of the docs instead so that users do not run into trouble with the alias being different from one project to another. I will update my pull request to use npx tsc instead of npm run typecheck.

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.
@Josh-Cena Josh-Cena changed the title docs(TypeScript support): Correct npm run tsc to npm run typecheck in documentation page docs: npm run tsc -> npx tsc Mar 24, 2022
@Josh-Cena Josh-Cena added the pr: documentation This PR works on the website or other text documents in the repo. label Mar 24, 2022
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Mar 24, 2022
@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

Copy link
Collaborator

@Josh-Cena Josh-Cena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: documentation This PR works on the website or other text documents in the repo.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants