Skip to content
This repository has been archived by the owner on Mar 10, 2024. It is now read-only.

Commit

Permalink
fix: ignoreUnresolved (#191)
Browse files Browse the repository at this point in the history
  • Loading branch information
foucdeg authored Nov 18, 2023
1 parent ae553ff commit 95a44c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/__tests__/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@ export default promise
{ name: 'index.js', content: `import foo from './foo';` },
{
name: '.unimportedrc.json',
content: '{"ignoreUnresolved": ["./foo"]}',
content: '{"ignoreUnresolved": [["./foo", ["index.js"]]]}',
},
],
exitCode: 0,
Expand Down
2 changes: 1 addition & 1 deletion src/process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export async function processResults(
const ignoreUnimportedIdx = index(context.config.ignoreUnimported);

const unresolved = Array.from(traverseResult.unresolved).filter(
([x]) => !ignoreUnresolvedIdx[x],
(entry) => !ignoreUnresolvedIdx[entry.toString()],
);

const unused = Object.keys(context.dependencies).filter(
Expand Down

0 comments on commit 95a44c5

Please sign in to comment.