Path: blob/main/docs/rules/no-relative-packages.md
829 views
import/no-relative-packages
Use this rule to prevent importing packages through relative paths.
It's useful in Yarn/Lerna workspaces, were it's possible to import a sibling package using ../package relative path, while direct package is the correct one.
Examples
Given the following folder structure:
And the .eslintrc file:
The following patterns are considered problems:
The following patterns are NOT considered problems: