Skip to content

Commit

Permalink
fix(rules): no-banned-files ignores node_modules
Browse files Browse the repository at this point in the history
Closes #330
  • Loading branch information
boneskull committed Aug 25, 2023
1 parent 6dc69c2 commit 4eb6e5d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/rules/builtin/no-banned-files.ts
Expand Up @@ -91,6 +91,9 @@ const noBannedFiles = createRule({
const dirents = await fs.readdir(dir, {withFileTypes: true});
for (const dirent of dirents) {
if (dirent.isDirectory()) {
if (path.basename(dirent.name) === 'node_modules') {
continue;
}
queue.push(path.join(dir, dirent.name));
} else {
if (allow.has(dirent.name)) {
Expand Down

0 comments on commit 4eb6e5d

Please sign in to comment.