This repository was archived by the owner on Oct 4, 2022. It is now read-only.
This repository was archived by the owner on Oct 4, 2022. It is now read-only.
Add eslint rule to avoid direct import from other packages. #268
Open
Description
Explanation
When importing a dependency we should not allow "direct" imports (from other packages) like this:
import transliterate from "yoastseo/src/stringProcessing/transliterate";
instead we should use this:
import { string } from "yoastseo";
const { transliterate } = string;
This is because direct imports cause problems in the plugin's webpack configuration.
To avoid problems in the future we should have an eslint rule that prohibits direct imports across packages.