eslint-plugin-use-agnostic 2.0.8 → 2.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -253,10 +253,8 @@ const importedFileFlow = (context, node, resolver) => {
|
|
|
253
253
|
// cwd: path.dirname(context.filename),
|
|
254
254
|
// }) ?? context.cwd,
|
|
255
255
|
// );
|
|
256
|
-
const resolvedImportPath =
|
|
257
|
-
context.filename,
|
|
258
|
-
node.source.value,
|
|
259
|
-
).path;
|
|
256
|
+
const resolvedImportPath =
|
|
257
|
+
resolver.resolveFileSync(context.filename, node.source.value).path ?? null;
|
|
260
258
|
console.debug("resolvedImportPath is:", resolvedImportPath);
|
|
261
259
|
|
|
262
260
|
// does not operate on paths it did not resolve
|
|
@@ -371,10 +369,8 @@ const importedFileFlowRequire = (context, node, resolver) => {
|
|
|
371
369
|
// cwd: path.dirname(context.filename),
|
|
372
370
|
// }) ?? context.cwd,
|
|
373
371
|
// );
|
|
374
|
-
const resolvedImportPath =
|
|
375
|
-
context.filename,
|
|
376
|
-
importPath,
|
|
377
|
-
).path;
|
|
372
|
+
const resolvedImportPath =
|
|
373
|
+
resolver.resolveFileSync(context.filename, importPath).path ?? null;
|
|
378
374
|
console.debug("resolvedImportPath (require) is:", resolvedImportPath);
|
|
379
375
|
|
|
380
376
|
// does not operate on paths it did not resolve
|