Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/rules/no-extraneous-import.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

<!-- end auto-generated rule header -->

If an `import` declaration's source is extraneous (it's not written in `package.json`), the program works in local, but will not work after dependencies are re-installed. It will cause troubles to your team/contributors.
If an `import` declaration's source is extraneous (it's not written in `package.json`), the program works in local, but may not work after dependencies are re-installed. It will cause troubles to your team/contributors. If a declaration source is extraneous yet consistently works for you and your team, it may be a transitive dependency (a dependency of a dependency). Transitive dependencies should still be saved as an explicit dependency in `package.json` to avoid the risk of a dependency changing and removing the dependency of a dependency this `import` is relying on.
Comment thread
DingoEatingFuzz marked this conversation as resolved.
Outdated
Comment thread
scagood marked this conversation as resolved.
Outdated

This rule disallows `import` declarations of extraneous modules.

## 📖 Rule Details
Expand Down
3 changes: 2 additions & 1 deletion docs/rules/no-extraneous-require.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

<!-- end auto-generated rule header -->

If a `require()`'s target is extraneous (it's not written in `package.json`), the program works in local, but will not work after dependencies are re-installed. It will cause troubles to your team/contributors.
If a `require()`'s target is extraneous (it's not written in `package.json`), the program works in local, but may not work after dependencies are re-installed. It will cause troubles to your team/contributors. If a target is extraneous yet consistently works for you and your team, it may be a transitive dependency (a dependency of a dependency). Transitive dependencies should still be saved as an explicit dependency in `package.json` to avoid the risk of a dependency changing and removing the dependency of a dependency this `require()` is relying on.

This rule disallows `require()` of extraneous modules.

## 📖 Rule Details
Expand Down