UNPKG

agentsqripts

Version:

Comprehensive static code analysis toolkit for identifying technical debt, security vulnerabilities, performance issues, and code quality problems

18 lines (15 loc) 490 B
/** * @file Format file path for display * @description Single responsibility: Convert absolute paths to relative paths */ const path = require('path'); /** * Format file path for display * @param {string} filePath - Absolute file path * @param {string} basePath - Base path for relative display * @returns {string} Formatted file path */ function formatFilePath(filePath, basePath = process.cwd()) { return path.relative(basePath, filePath); } module.exports = formatFilePath;