UNPKG

@conarti/eslint-plugin-feature-sliced

Version:
19 lines (18 loc) 559 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.convertToAbsolute = void 0; const is_path_relative_1 = require("./is-path-relative"); const join_path_1 = require("./join-path"); function convertToAbsolute(base, target) { if (target === '') { return base; } if (base === '') { return target; } if (!(0, is_path_relative_1.isPathRelative)(target)) { return target; } return (0, join_path_1.joinPath)(base, `../${target}`); } exports.convertToAbsolute = convertToAbsolute;