UNPKG

@conarti/eslint-plugin-feature-sliced

Version:
22 lines (21 loc) 935 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.extractPaths = void 0; const path_1 = require("../path"); const extract_current_file_path_1 = require("./extract-current-file-path"); const extract_cwd_1 = require("./extract-cwd"); const extract_node_path_1 = require("./extract-node-path"); function extractPaths(node, context) { const normalizedCurrentFilePath = (0, extract_current_file_path_1.extractCurrentFilePath)(context); const { targetPath, normalizedTargetPath, } = (0, extract_node_path_1.extractNodePath)(node); const absoluteTargetPath = (0, path_1.convertToAbsolute)(normalizedCurrentFilePath, normalizedTargetPath); const cwd = (0, extract_cwd_1.extractCwd)(context); return { targetPath, normalizedTargetPath, normalizedCurrentFilePath, absoluteTargetPath, normalizedCwd: cwd, }; } exports.extractPaths = extractPaths;