Skip to content

Conversation

@DingoEatingFuzz
Copy link

I bumped into this today and the rule totally makes sense, but I think the docs are missing a slightly pedantic yet still important scenario regarding importing transitive dependencies.

no-extraneous-require will fail when a require is requiring a consistently available package that is not explicitly listed as a direct dependency. This doc change explains why.
Update import doc to match require doc.
Copy link

@scagood scagood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks so much better! Thank you for the PR 😍

@scagood scagood changed the title Explain the transitive dependency case for no-extraneous-{import/require} docs: Explain the transitive dependency case for no-extraneous-* Sep 25, 2024
@DingoEatingFuzz
Copy link
Author

Your edits make it read much better! I copied your suggestion to the require doc and added the note you suggested about how transitive deps from dev deps won't be available in production installs.

Copy link

@scagood scagood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thank you!

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