From b020f2cad2e7a5981a5871b67719700dd60ca696 Mon Sep 17 00:00:00 2001 From: Per Bockman Date: Wed, 19 Jun 2024 11:33:24 +0200 Subject: [PATCH] fix: support shared prettier config files Revert breaking change introduced in cosmiconfig v9.0.0 --- src/configuration.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/configuration.js b/src/configuration.js index f78b4094..70013afb 100644 --- a/src/configuration.js +++ b/src/configuration.js @@ -429,7 +429,9 @@ class CodeGenConfig { } const getDefaultPrettierOptions = () => { - const prettier = cosmiconfigSync("prettier").search(); + const prettier = cosmiconfigSync("prettier", { + searchStrategy: "global", + }).search(); if (prettier) { return {