Skip to content

Commit

Permalink
Call out how transitive dependencies via dev dependencies will not be…
Browse files Browse the repository at this point in the history
… available in production installations
  • Loading branch information
DingoEatingFuzz committed Sep 26, 2024
1 parent e31709b commit be49f88
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/rules/no-extraneous-import.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

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
2 changes: 2 additions & 0 deletions docs/rules/no-extraneous-require.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

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

0 comments on commit be49f88

Please sign in to comment.