Skip to content

feat: address ESLint's no-unresolved warning #501

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dscho
Copy link

@dscho dscho commented Mar 25, 2025

Resolves #446


Before the change?

  • ESLint complains about the missing @octokit/rest module (see e.g. here).

After the change?

  • ESLint no longer complains.

This is achieved by adding the main property for backwards-compatibility, needed e.g. when running ESLint.

The change recapitulates what aad55f4 already did but which was unfortunately reverted in the same PR by 1b6e582 (probably under the incorrect assumption that exports.default would be enough as a fall-back).

Pull request checklist

  • Does not apply: Tests for the changes have been added (for bug fixes / features)
  • Does not apply: Docs have been reviewed and added / updated if needed (for bug fixes / features)

Does this introduce a breaking change?

  • Yes
  • No

/cc @wolfy1339 @kfcampbell

This adds the `main` property for backwards-compatibility, needed e.g.
when running ESLint.

The change recapitulates what
octokit@aad55f4
already did but which was unfortunately reverted in the same PR by
octokit@1b6e582
(probably under the incorrect assumption that `exports.default` would be
enough as a fall-back).

This fixes octokit#446.

Signed-off-by: Johannes Schindelin <[email protected]>
Copy link
Contributor

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 Triage
Development

Successfully merging this pull request may close these issues.

[BUG]: v21 fails eslint-plugin-import's no-unresolved rule
1 participant