From c94cef61c3e19126e09606670f433dd0713d3d8f Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 16 Oct 2026 10:32:19 +0000 Subject: [PATCH 1/2] fix(tooling): resolve prettier-plugin-packagejson from the shared config (#108) Prettier resolves bare plugin names from process.cwd(), i.e. the repo root, but pnpm installs @repo/prettier-config's devDependencies only under packages/prettier-config/node_modules. Every pre-commit run of lint-staged (and `pnpm format` / `format:check`) therefore failed with "Cannot find package 'prettier-plugin-packagejson'", so commits either skipped the hook or landed unformatted. Resolve the plugin with require.resolve from the config file itself. Prettier imports absolute plugin paths through pathToFileURL, so this also works on Windows. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_015v1boe4iagzc2mQVMuU39b --- packages/prettier-config/prettier.config.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/prettier-config/prettier.config.js b/packages/prettier-config/prettier.config.js index f8202256..bee66227 100644 --- a/packages/prettier-config/prettier.config.js +++ b/packages/prettier-config/prettier.config.js @@ -6,5 +6,7 @@ module.exports = { tabWidth: 2, trailingComma: 'es5', useTabs: false, - plugins: ['prettier-plugin-packagejson'], + // Prettier resolves bare plugin names from process.cwd() (the repo root), where + // pnpm does not hoist this package's devDependencies. Resolve from here instead. + plugins: [require.resolve('prettier-plugin-packagejson')], }; From 93132265ef8a2e47b80f1d47dc203547c789cb11 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 16 Oct 2026 10:33:57 +0000 Subject: [PATCH 2/2] fix(tooling): resolve prettier-plugin-tailwindcss from apps/web (#108) Same root cause as the shared config: Prettier resolves bare plugin names from process.cwd(), so running Prettier from the repo root (`pnpm format`, `pnpm format:check`) failed on every apps/web file. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_015v1boe4iagzc2mQVMuU39b --- apps/web/prettier.config.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/apps/web/prettier.config.js b/apps/web/prettier.config.js index 523854a3..b76e7c00 100644 --- a/apps/web/prettier.config.js +++ b/apps/web/prettier.config.js @@ -1,7 +1,11 @@ -const globalConfig = require("@repo/prettier-config") +const globalConfig = require('@repo/prettier-config'); /** @type {import('prettier').Config} */ module.exports = { ...globalConfig, - plugins: [...globalConfig.plugins, "prettier-plugin-tailwindcss"], -} + // Resolve from this package (see packages/prettier-config/prettier.config.js). + plugins: [ + ...globalConfig.plugins, + require.resolve('prettier-plugin-tailwindcss'), + ], +};