Skip to content
LogoLogo

cross-package-relative-dependencies

Category: correctness. Default: error. Fixable: no. Since: 0.1.0.

What it does

Reports relative imports that reach into another workspace package, for example ../other-package/src/x.

Why is this bad?

A package must depend on another package through the package name. Then package.json declares the dependency, and the package boundary stays intact.

Configure the rule

{
  "rules": {
    "cross-package-relative-dependencies": "warn"
  }
}