Skip to content

Commit c461a86

Browse files
authored
fix(oxlint): Fix type-aware linting crash when Vue files are present (#13007)
1 parent 54d1750 commit c461a86

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/oxlint/src/tsgolint.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use oxc_diagnostics::{DiagnosticSender, DiagnosticService, OxcDiagnostic, Severi
1212
use oxc_linter::{
1313
AllowWarnDeny, ConfigStore, LintServiceOptions, ResolvedLinterState, read_to_string,
1414
};
15-
use oxc_span::Span;
15+
use oxc_span::{SourceType, Span};
1616

1717
use crate::cli::CliRunResult;
1818

@@ -72,6 +72,7 @@ impl<'a> TsGoLintState<'a> {
7272
files: self
7373
.paths
7474
.iter()
75+
.filter(|path| SourceType::from_path(Path::new(path)).is_ok())
7576
.map(|path| TsGoLintInputFile {
7677
file_path: path.to_string_lossy().to_string(),
7778
rules: {

0 commit comments

Comments
 (0)