Skip to content

Commit

Permalink
fix(linter): hanging when source has syntax/is flow
Browse files Browse the repository at this point in the history
  • Loading branch information
camc314 committed Nov 23, 2024
1 parent 4d6bd07 commit b2e9a97
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/oxc_linter/src/service/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use oxc_allocator::Allocator;
use oxc_diagnostics::{DiagnosticSender, DiagnosticService, Error, OxcDiagnostic};
use oxc_parser::{ParseOptions, Parser};
use oxc_resolver::Resolver;
use oxc_semantic::SemanticBuilder;
use oxc_semantic::{ModuleRecord, SemanticBuilder};
use oxc_span::{SourceType, VALID_EXTENSIONS};
use rayon::{iter::ParallelBridge, prelude::ParallelIterator};
use rustc_hash::FxHashSet;
Expand Down Expand Up @@ -199,6 +199,7 @@ impl Runtime {
.parse();

if !ret.errors.is_empty() {
self.modules.add_resolved_module(path, Arc::new(ModuleRecord::default()));
return if ret.is_flow_language {
vec![]
} else {
Expand Down

0 comments on commit b2e9a97

Please sign in to comment.