Do not propose prettier formatters for documents in node_modules/
This commit is contained in:
parent
ce40d5e0c5
commit
2e957bc564
2 changed files with 19 additions and 17 deletions
|
@ -64,6 +64,12 @@ impl Prettier {
|
|||
.components()
|
||||
.take_while(|component| component.as_os_str().to_string_lossy() != "node_modules")
|
||||
.collect::<PathBuf>();
|
||||
if path_to_check != locate_from {
|
||||
log::debug!(
|
||||
"Skipping prettier location for path {path_to_check:?} that is inside node_modules"
|
||||
);
|
||||
return Ok(ControlFlow::Break(()));
|
||||
}
|
||||
let path_to_check_metadata = fs
|
||||
.metadata(&path_to_check)
|
||||
.await
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue