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

Explicit tsconfig target & module #618

Merged
merged 1 commit into from
Aug 22, 2023
Merged

Explicit tsconfig target & module #618

merged 1 commit into from
Aug 22, 2023

Conversation

adamalfredsson
Copy link
Collaborator

These are the default settings for target & module. It seems conventional to make this explicit. ChatGPT lists some reasons:

  1. Clarity: Being explicit about your configuration can make it clearer for anyone reading the configuration, especially for those who might not be aware of the defaults. It also leaves no room for doubt about what values are being used.
  2. Stability: If TypeScript ever changes its default settings in a future version (which is unlikely but not impossible), your project won't be unexpectedly affected because you've explicitly set the values you want.
  3. Self-Documentation: By explicitly setting these configurations, developers don't need to look up the defaults, reducing the potential for errors or misunderstandings. This can be particularly beneficial for less experienced developers or those new to TypeScript.
  4. Explicit Migrations: If you decide to change these settings in the future, having them already present makes it clear that you're intentionally changing a setting rather than just adding one.

Tested on devices

  • Desktop 💻
  • Mobile 📱

Tests

  • All tests are running ✔️
  • Test are updated 🧪
  • Code Review 👩‍💻
  • QA 👌

Checkpoints

Check these to flag for a more thurough review, as they could be potentially breaking changes

  • Packages updated
  • Other infrastructure updated (such as node version or similar)

⏲️ Time spent on CR:

⏲️ Time spent on QA:

@fellmirr
Copy link
Member

@adamalfredsson To be clear, these are the values default resolve to?

@adamalfredsson
Copy link
Collaborator Author

@fellmirr fellmirr merged commit 648912f into master Aug 22, 2023
2 checks passed
@fellmirr fellmirr deleted the explicit-tsconfig branch August 22, 2023 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants