DefinitelyTyped / DefinitelyTyped/DefinitelyTyped
[dtslint] npm-naming NeedsExportEquals rule erroneously fails
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 51.4k
- Forks
- 30.4k
- Avg merge
- 3d 21h
- Merged PRs (30d)
- 108
Description
Creating this matching issue to capture this on GitHub.
When creating a type definition for a package which has no export = syntax in its dist, and running npm run test packageName, I'm getting:
Instead of `export =`-ing a namespace, use the body of the namespace as the module body export-just-namespace
As can be verified in the dist, the package is using the following syntax in its dist for CJS / ESM:
CJS:
exports.parse = parse$3;
exports.build = build;
ESM:
export { parse$3 as parse, build };
See the PR and package dist for reference.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the dtslint npm-naming NeedsExportEquals rule and reproduce the failure using npm run test packageName. Compare the rule's result with the package dist syntax linked in the issue; done when a package without export = passes without the export-just-namespace failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100