Skip to content

Commit 66a350e

Browse files
committed
fix(oxlint): should type linting files after ignore (#13149)
1 parent da3c7fb commit 66a350e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

apps/oxlint/src/lint.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -291,22 +291,22 @@ impl LintRunner {
291291

292292
let config_store = ConfigStore::new(lint_config, nested_configs, external_plugin_store);
293293

294+
let files_to_lint = paths
295+
.into_iter()
296+
.filter(|path| !config_store.should_ignore(Path::new(path)))
297+
.collect::<Vec<Arc<OsStr>>>();
298+
294299
// Run type-aware linting through tsgolint
295300
// TODO: Add a warning message if `tsgolint` cannot be found, but type-aware rules are enabled
296301
if self.options.type_aware {
297302
if let Err(err) = TsGoLintState::new(options.cwd(), config_store.clone())
298-
.lint(&paths, tx_error.clone())
303+
.lint(&files_to_lint, tx_error.clone())
299304
{
300305
print_and_flush_stdout(stdout, &err);
301306
return CliRunResult::TsGoLintError;
302307
}
303308
}
304309

305-
let files_to_lint = paths
306-
.into_iter()
307-
.filter(|path| !config_store.should_ignore(Path::new(path)))
308-
.collect::<Vec<Arc<OsStr>>>();
309-
310310
let linter = Linter::new(LintOptions::default(), config_store, self.external_linter)
311311
.with_fix(fix_options.fix_kind())
312312
.with_report_unused_directives(report_unused_directives);

0 commit comments

Comments
 (0)