diff --git a/apps/oxlint/src/lint.rs b/apps/oxlint/src/lint.rs index c65958c7ffd84..b6f26d4fe48f2 100644 --- a/apps/oxlint/src/lint.rs +++ b/apps/oxlint/src/lint.rs @@ -445,7 +445,10 @@ impl LintRunner { while let Some(dir) = current { // NOTE: Initial benchmarking showed that it was faster to iterate over the directories twice // rather than constructing the configs in one iteration. It's worth re-benchmarking that though. - directories.insert(dir); + let inserted = directories.insert(dir); + if !inserted { + break; + } current = dir.parent(); } }