Skip to content

refactor: make each tsconfig explicitly declare module and include/exclude#7443

Merged
Josh-Cena merged 1 commit intomainfrom
jc/refactor-tsconfig
May 18, 2022
Merged

refactor: make each tsconfig explicitly declare module and include/exclude#7443
Josh-Cena merged 1 commit intomainfrom
jc/refactor-tsconfig

Conversation

@Josh-Cena
Copy link
Collaborator

@Josh-Cena Josh-Cena commented May 18, 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

Another round of effort to make our TS setup more approachable.

This time, the root tsconfig.json doesn't control emit options anymore, in particular, module. This means each project needs to explicitly declare itself as ESM or CJS, which will help with progressive ESM migration (#6520).

In addition, the root tsconfig also doesn't exclude test files now. VS Code still doesn't pick up any tsconfig for test files because the nearest one excludes them. However, we are now at least able to run yarn tsc at the root and get all test files' type-checking errors, which will help in the future if we are to use TS-ESLint's type-aware linting rules, or simply if we want to integrate type-checking test files into the CI.

Test Plan

Test links

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

Related issues/PRs

@Josh-Cena Josh-Cena added the pr: maintenance This PR does not produce any behavior differences to end users when upgrading. label May 18, 2022
@Josh-Cena Josh-Cena requested review from lex111 and slorber as code owners May 18, 2022 04:17
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label May 18, 2022
@netlify
Copy link

netlify bot commented May 18, 2022

[V2]

Name Link
🔨 Latest commit 4112238
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/6284736516164a00082fdd84
😎 Deploy Preview https://deploy-preview-7443--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
/ 🟠 88 🟢 100 🟢 100 🟢 100 🟢 90 Report
/docs/installation 🟢 91 🟢 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 a555fd1 into main May 18, 2022
@Josh-Cena Josh-Cena deleted the jc/refactor-tsconfig branch May 18, 2022 04:48
@Josh-Cena Josh-Cena added pr: ignore This PR is not meaningful enough to appear in the changelog. and removed pr: maintenance This PR does not produce any behavior differences to end users when upgrading. labels May 23, 2022
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: ignore This PR is not meaningful enough to appear in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants