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: implement additional tsconfig properties #64

Merged
merged 3 commits into from
Feb 14, 2025

Conversation

justlevine
Copy link
Collaborator

@justlevine justlevine commented Feb 13, 2025

What

This PR makes the following changes to tsconfig.base.json. Reasons are included alongside the change:

  • noImplicitOverride: true - We're using classes, and we may want to extend them in future packages
  • declaration: true - We're a library. d.ts files help end user IDEs
  • sourceMap: true - We're a library, sourcemaps help end users debug
  • isolatedModules: true - limits some ts edge cases.
  • moduleDetection: "force" - Prevents unexpected behavior leaking from autodetection.
  • resolveJsonModule: true - so we can import .json
  • module|target: es2022 - the modern "stable" version.

Why

These are all noncontroversial, incremental improvements that don't require any existing code changes to satisfy.

Individual property explanations are here https://www.typescriptlang.org/tsconfig

Related Issue(s):

Part of https://github.com/rtCamp/headless/issues/317

How

Testing Instructions

Screenshots

Additional Info

Additionally set noUncheckedIndexedAccess and verbatimModuleSyntax to false, but they'll be handled in a separate PR since they require file changes.

Checklist

  • I have read the Contribution Guidelines.
  • My code is tested to the best of my abilities.
  • My code passes all lints (ESLint, tsc, prettier etc.).
  • My code has detailed inline documentation.
  • I have added unit tests to verify the code works as intended.
  • I have updated the project documentation accordingly.

config/tsconfig.base.json Outdated Show resolved Hide resolved
ayushnirwal
ayushnirwal previously approved these changes Feb 14, 2025
@justlevine
Copy link
Collaborator Author

5dbe955 adds

  • resolveJsonModule: true
  • bumps module and target to ES2022
  • stubs exactOptionalPropertyTypes and noPropertyAccessFromIndexSignature (enabling would require file remediation)

@justlevine justlevine merged commit e232ce7 into rtCamp:develop Feb 14, 2025
8 checks passed
@justlevine justlevine deleted the chore/tsconfig-pass-2 branch February 14, 2025 11:22
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