eslint-plugin-conarti-fsd
Version:
Feature-sliced design methodology plugin
22 lines (17 loc) • 319 B
JavaScript
module.exports.shouldBeAbsolute = (pathsInfo) => {
const {
isRelative,
importLayer,
currentFileLayer,
} = pathsInfo;
if (!isRelative) {
return false;
}
if (!importLayer) {
return false;
}
if (!currentFileLayer) {
return false;
}
return currentFileLayer !== importLayer;
};