Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker committed Feb 10, 2023
1 parent f064f99 commit a0f203e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion src/common/get-file-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@ async function getFileInfo(filePath, options) {
);
}

const ignored = await isIgnored(filePath, options);
let { ignorePath, withNodeModules } = options;
// In API we allow single `ignorePath`
if (!Array.isArray(ignorePath)) {
ignorePath = [ignorePath]
}

const ignored = await isIgnored(filePath, {ignorePath, withNodeModules});

let inferredParser;
if (!ignored) {
Expand Down
4 changes: 2 additions & 2 deletions src/utils/ignore.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ async function createIsIgnoredFunction(ignoreFilePaths, withNodeModules) {
}

/**
* @param {string} filepath
* @param {{ignorePath?: string, withNodeModules?: boolean}} options
* @param {string[]} filepath
* @param {{ignorePath: string[], withNodeModules?: boolean}} options
* @returns {Promise<boolean>}
*/
async function isIgnored(filepath, options) {
Expand Down

0 comments on commit a0f203e

Please sign in to comment.