chore: merge changes
This commit is contained in:
parent
5a427c0379
commit
831514d8c7
1 changed files with 10 additions and 4 deletions
|
|
@ -3,15 +3,21 @@ use std::path::Path;
|
|||
use std::process::Command;
|
||||
|
||||
pub fn formatter(file: &Path) -> io::Result<()> {
|
||||
Command::new("pnpm")
|
||||
let result = Command::new("pnpm")
|
||||
.arg("eslint")
|
||||
.arg("--flag")
|
||||
.arg("unstable_ts_config")
|
||||
.arg("--fix")
|
||||
.arg(file)
|
||||
.output()
|
||||
.map(|_| ())
|
||||
.map_err(io::Error::other)
|
||||
.output();
|
||||
|
||||
match result {
|
||||
Ok(_) => Ok(()),
|
||||
Err(e) => {
|
||||
eprintln!("error running formatter on {}: {}", file.display(), e);
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const _: specta_typescript::FormatterFn = formatter;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue