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

refactor: make entire project typecheck with root tsconfig #7466

Merged
merged 1 commit into from
May 23, 2022

Conversation

Josh-Cena
Copy link
Collaborator

@Josh-Cena Josh-Cena commented May 23, 2022

Pre-flight checklist

  • I have read the Contributing Guidelines on pull requests.
  • If this is a code change: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.
  • If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.

Motivation

Again, using type-aware linting requires the root tsconfig to include all files (else we would need to create a TS Program for every package, which absolutely OOMs). However, the website folder uses a different tsconfig that doesn't extend the root. In this case, I've separated the website project out so it's type-checked alone, unaffected by the root.

Test Plan

The __tests__ files still don't typecheck. However, now when you exclude them from the root tsconfig, there aren't any type errors when you run yarn tsc at the root, only a few reports about export =, because in this single-run tsc, module is set to esnext.

Test links

Deploy preview: https://deploy-preview-_____--docusaurus-2.netlify.app/

Related issues/PRs

@Josh-Cena Josh-Cena added the pr: internal This PR does not touch production code, or is not meaningful enough to be in the changelog. label May 23, 2022
@Josh-Cena Josh-Cena requested review from slorber and lex111 as code owners May 23, 2022 04:41
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label May 23, 2022
@netlify
Copy link

netlify bot commented May 23, 2022

[V2]

Name Link
🔨 Latest commit 797039f
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/628b1071c067cd00083c61d7
😎 Deploy Preview https://deploy-preview-7466--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

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO PWA Report
/ 🟠 69 🟢 100 🟢 100 🟢 100 🟢 90 Report
/docs/installation 🟠 81 🟢 99 🟢 100 🟢 100 🟢 90 Report

@github-actions
Copy link

Size Change: 0 B

Total Size: 796 kB

ℹ️ View Unchanged
Filename Size
website/.docusaurus/globalData.json 52.3 kB
website/build/assets/css/styles.********.css 106 kB
website/build/assets/js/main.********.js 599 kB
website/build/index.html 38.9 kB

compressed-size-action

@Josh-Cena Josh-Cena merged commit 2d94d57 into main May 23, 2022
@Josh-Cena Josh-Cena deleted the jc/tighten-website branch May 23, 2022 04:54
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: internal This PR does not touch production code, or is not meaningful enough to be in the changelog.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants