Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
5 changes: 4 additions & 1 deletion docs/rules/no-extraneous-import.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@

<!-- 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 listed in your `package.json`), the program may work locally but can break after dependencies are re-installed. This can cause issues for your team/contributors. If a declaration source is extraneous yet consistently works for you and your team, it might be a transitive dependency (a dependency of another dependency). Transitive dependencies should still be added as an explicit dependency in your `package.json` to avoid the risk of a dependency potentially changing or removing the transitive dependency.

Additionally, the transitive dependency could be a dev dependency, meaning your code could work in development but not in production.

This rule disallows `import` declarations of extraneous modules.

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

<!-- 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 listed in your `package.json`), the program may work locally but can break after dependencies are re-installed. This can cause issues for your team/contributors. If a declaration source is extraneous yet consistently works for you and your team, it might be a transitive dependency (a dependency of another dependency). Transitive dependencies should still be added as an explicit dependency in your `package.json` to avoid the risk of a dependency potentially changing or removing the transitive dependency.

Additionally, the transitive dependency could be a dev dependency, meaning your code could work in development but not in production.

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

## 📖 Rule Details
Expand Down