Skip to content

Commit 4767469

Browse files
authored
[doctor] Don't warn about scripts named "prettier" (#2021)
* [doctor] Don't warn about scripts named "prettier" Signed-off-by: Reece Dunham <[email protected]> * Apply feedback, version check
1 parent 92b9e34 commit 4767469

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

.yarn/versions/a09d2933.yml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
releases:
2+
"@yarnpkg/doctor": patch

packages/yarnpkg-doctor/sources/cli.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ async function processWorkspace(workspace: Workspace, {configuration, fileList,
293293
const reportedProgress = report.reportProgress(progress);
294294

295295
for (const scriptName of workspace.manifest.scripts.keys())
296-
if (scriptName.match(/^(pre|post)(?!(install|pack)$)/))
296+
if (scriptName.match(/^(pre|post)(?!(install|pack)$)/) && !scriptName.match(/^prettier/))
297297
report.reportWarning(MessageName.UNNAMED, `User scripts prefixed with "pre" or "post" (like "${scriptName}") will not be called in sequence anymore; prefer calling prologues and epilogues explicitly`);
298298

299299
for (const p of fileList) {

0 commit comments

Comments
 (0)