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: improve tsconfig #93

Merged
merged 1 commit into from
Nov 30, 2023
Merged

chore: improve tsconfig #93

merged 1 commit into from
Nov 30, 2023

Conversation

Mist3rBru
Copy link
Contributor

Description

This pull request includes updates to the tsconfig.json file, aligning it with modern development practices. The changes introduced are as follows:

Changes

  • "moduleResolution": "Bundler": Since TypeScript 5.0, the "moduleResolution" configuration now deprecates the Node.js resolution modes ("Node" and "Node10") in favor of "Bundler". This setting is designed for compatibility with bundlers. In contrast to the Node.js resolution modes, the "Bundler" mode allows seamless usage of "imports" and "exports" without the need for file extensions on relative paths in imports.
  • "moduleDetection": "force": Enabling this option ensures that every non-declaration file is treated as a module, providing a more consistent and predictable module handling approach.
  • "isolatedModules": true: TypeScript will now issue warnings for code that might not be correctly interpreted by a single-file transpilation process, helping catch potential issues early in the development process.
  • "verbatimModuleSyntax": true: Forces type imports to be flagged with a type modifier. This is particularly useful for bundlers, as it signals upfront that the code won't be used as a value, allowing the bundler to exclude it from the generated JavaScript code.
  • "noEmit": true: It was used as a flag on typecheck script, now it is part of tsconfig.json

@antfu antfu merged commit 9ad7f0a into antfu-collective:main Nov 30, 2023
5 checks passed
@Mist3rBru Mist3rBru deleted the improve-tsconfig branch November 30, 2023 12:04
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