Skip to content

Commit 560feb4

Browse files
committed
feat(linter): introduce Vite variant to DiscoveredConfigFile (#21637)
1 parent 735aba2 commit 560feb4

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

apps/oxlint/src/config_discovery.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@ pub enum DiscoveredConfigFile {
1212
Json(PathBuf),
1313
Jsonc(PathBuf),
1414
Js(PathBuf),
15+
Vite(PathBuf),
1516
}
1617

1718
impl DiscoveredConfigFile {
1819
pub fn path(&self) -> &Path {
1920
match self {
20-
Self::Json(path) | Self::Jsonc(path) | Self::Js(path) => path,
21+
Self::Json(path) | Self::Jsonc(path) | Self::Js(path) | Self::Vite(path) => path,
2122
}
2223
}
2324
}

apps/oxlint/src/config_loader.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,12 @@ impl<'a> ConfigLoader<'a> {
373373
Err(e) => errors.push(e),
374374
}
375375
}
376-
Some(DiscoveredConfigFile::Js(path)) => js_configs.push(path),
376+
Some(DiscoveredConfigFile::Js(path)) => {
377+
js_configs.push(path);
378+
}
379+
Some(DiscoveredConfigFile::Vite(_)) => {
380+
// TODO: will be implemented in future
381+
}
377382
None => {
378383
debug_assert!(
379384
false,

0 commit comments

Comments
 (0)