Skip to content

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

Merged
scagood merged 4 commits intoeslint-community:masterfrom
DingoEatingFuzz:patch-1
Sep 26, 2024
Merged

docs: Explain the transitive dependency case for no-extraneous-*#347
scagood merged 4 commits intoeslint-community:masterfrom
DingoEatingFuzz:patch-1

Conversation

@DingoEatingFuzz
Copy link
Copy Markdown

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
Copy Markdown

@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 😍

Comment thread docs/rules/no-extraneous-import.md Outdated
Comment thread docs/rules/no-extraneous-import.md Outdated
@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
Copy Markdown
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
Copy Markdown

@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