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

Updates for main with no exports #21

Closed
wants to merge 1 commit into from

Conversation

benmccann
Copy link
Contributor

The current message is quite confusing to me because exports doesn't have anything to do with ESM. You can use it with CJS as well. This updates it to apply whether the code is CJS or ESM.

@bluwy
Copy link
Owner

bluwy commented Jan 14, 2023

I think this PR changes the intent though. The idea was that if you have main but no exports, you should use exports instead. It looks like I didn't check this right, it should be if (expectFormat === 'ESM' && !exports) { 😦

I think we should fix it and keep it that way for now. The message needs an update too. I can fix this myself too.

With that said, I think the idea of this PR is good, but it'd need to be a new rule, and maybe apply to module field too.

@bluwy
Copy link
Owner

bluwy commented Jan 14, 2023

Aight that's fixed at 57fdc43. Sorry for the new conflicts and thanks for spotting the bug 😬

@bluwy
Copy link
Owner

bluwy commented Jan 16, 2023

I'll close this one for now and write a new issue so we keep track of this.

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