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

chore(tsconfig): move compilerOptions up #6489

Merged
merged 6 commits into from
Jun 9, 2022

Conversation

caugner
Copy link
Contributor

@caugner caugner commented Jun 7, 2022

Summary

Consolidates our tsconfig.json somewhat by moving some common compilerOptions into our root tsconfig.json:

  • allowSyntheticDefaultImports = true
  • esModuleInterop = true
  • forceConsistentCasingInFileNames = true
  • moduleResolution = node
  • resolveJsonModule = true
  • skipLibCheck = true

Exceptions:

  • /markdown/tsconfig.json needs esModuleInterop = false.
  • /client/pwa/tsconfig.json doesn't extend /tsconfig.json.

Note: Partially extracted from #6487.


How did you test this change?

  • See checks.

@github-actions github-actions bot added the markdown markdown related issues and pull requests label Jun 7, 2022
@caugner
Copy link
Contributor Author

caugner commented Jun 7, 2022

That test failure surprises me, but it looks like extends doesn't work as I would have expected.

@caugner caugner closed this Jun 7, 2022
@caugner caugner deleted the tsconfig-consolidation branch June 7, 2022 16:42
@caugner caugner restored the tsconfig-consolidation branch June 7, 2022 16:50
@caugner caugner reopened this Jun 7, 2022
@caugner caugner marked this pull request as ready for review June 7, 2022 16:59
@caugner caugner changed the title chore(tsconfig): consolidate configs chore(tsconfig): move compilerOptions up Jun 7, 2022
@caugner caugner requested a review from LeoMcA June 7, 2022 17:06
Copy link
Member

@LeoMcA LeoMcA left a comment

Choose a reason for hiding this comment

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

can we also remove resolveJsonModule from tsconfig.dist.json?

otherwise, looks good!

@caugner caugner enabled auto-merge (squash) June 9, 2022 14:08
@caugner caugner merged commit 97a5927 into mdn:main Jun 9, 2022
@caugner caugner deleted the tsconfig-consolidation branch June 9, 2022 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
markdown markdown related issues and pull requests typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants