-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #67 from arethetypeswrong/bug/false-export-default
Fix false positive of FalseExportDefault
- Loading branch information
Showing
4 changed files
with
19 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@arethetypeswrong/core": patch | ||
--- | ||
|
||
Fix a false positive of FalseExportDefault on packages that assign both to module.exports and module.exports.default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,16 +4,16 @@ | |
$ attw [email protected] -f table-flipped | ||
❗️ The resolved types use export default where the JavaScript file appears to use module.exports =. This will cause TypeScript under the node16 module mode to think an extra .default property access is required, but that will likely fail at runtime. These types should use export = instead of export default. https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseExportDefault.md | ||
No problems found 🌟 | ||
┌───────┬────────┬───────────────────┬──────────────────────────────┬─────────┐ | ||
│ │ node10 │ node16 (from CJS) │ node16 (from ESM) │ bundler │ | ||
├───────┼────────┼───────────────────┼──────────────────────────────┼─────────┤ | ||
│ "ajv" │ 🟢 │ 🟢 (CJS) │ ❗️ Incorrect default export │ 🟢 │ | ||
└───────┴────────┴───────────────────┴──────────────────────────────┴─────────┘ | ||
┌───────┬────────┬───────────────────┬───────────────────┬─────────┐ | ||
│ │ node10 │ node16 (from CJS) │ node16 (from ESM) │ bundler │ | ||
├───────┼────────┼───────────────────┼───────────────────┼─────────┤ | ||
│ "ajv" │ 🟢 │ 🟢 (CJS) │ 🟢 (CJS) │ 🟢 │ | ||
└───────┴────────┴───────────────────┴───────────────────┴─────────┘ | ||
``` | ||
|
||
Exit code: 1 | ||
Exit code: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters