Apply suggestion from @greptile-apps[bot]
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
parent
205affa0eb
commit
20249bb723
1 changed files with 5 additions and 2 deletions
|
|
@ -71,8 +71,11 @@ export const prettier: Info = {
|
||||||
devDependencies?: Record<string, string>
|
devDependencies?: Record<string, string>
|
||||||
}>(item)
|
}>(item)
|
||||||
if (json.dependencies?.prettier || json.devDependencies?.prettier) {
|
if (json.dependencies?.prettier || json.devDependencies?.prettier) {
|
||||||
return [await Npm.which("prettier"), "--write", "$FILE"]
|
if (json.dependencies?.prettier || json.devDependencies?.prettier) {
|
||||||
}
|
const bin = await Npm.which("prettier").catch(() => null)
|
||||||
|
if (!bin) return false
|
||||||
|
return [bin, "--write", "$FILE"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue