diff --git a/src/rules/no-restricted-paths.js b/src/rules/no-restricted-paths.js index 9b17975b5c..d8f281c9ee 100644 --- a/src/rules/no-restricted-paths.js +++ b/src/rules/no-restricted-paths.js @@ -74,7 +74,8 @@ module.exports = { const options = context.options[0] || {}; const restrictedPaths = options.zones || []; const basePath = options.basePath || process.cwd(); - const currentFilename = context.getPhysicalFilename ? context.getPhysicalFilename() : context.getFilename(); + const currentFilenameRaw = context.getPhysicalFilename ? context.getPhysicalFilename() : context.getFilename(); + const currentFilename = resolve(currentFilenameRaw, context); const matchingZones = restrictedPaths.filter((zone) => { return [].concat(zone.target) .map(target => path.resolve(basePath, target))