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

docs: Explain the transitive dependency case for no-extraneous-* #347

Merged
merged 4 commits into from
Sep 26, 2024

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 😍

docs/rules/no-extraneous-import.md Outdated Show resolved Hide resolved
docs/rules/no-extraneous-import.md Outdated Show resolved Hide resolved
@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 and others added 2 commits September 25, 2024 17:13
Co-authored-by: Sebastian Good <2230835+scagood@users.noreply.github.com>
@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