Skip to content

Conversation

@andrewbranch
Copy link
Collaborator

Fixes #10

Previously, FalseExportDefault had many cases of false positives where the JavaScript assigned an object to module.exports, and that object had a default property pointing back to itself. This pattern is not a true FalseExportDefault, but it is still problematic if the types only declare an export default. These kinds of false positives of FalseExportDefault are now instead reported as MissingExportEquals.

Additionally, FalseExportDefault was only ever reported as being visible in node16-esm, but this was incorrect. The consequences are most likely to be visible in node16-esm, but the problem is fundamentally independent of the module resolution mode, and inaccuracies can be observed in other modes as well, especially when esModuleInterop is not enabled.

@changeset-bot
Copy link

changeset-bot bot commented Sep 5, 2023

🦋 Changeset detected

Latest commit: 959229e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@arethetypeswrong/core Minor
@arethetypeswrong/cli Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@andrewbranch andrewbranch merged commit 7bf624b into main Sep 5, 2023
@andrewbranch andrewbranch deleted the checker branch September 5, 2023 01:53
@kachick kachick mentioned this pull request Apr 5, 2024
@github-actions github-actions bot mentioned this pull request Apr 5, 2024
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.

Verify export = vs export default for CJS

2 participants