plugin-tools icon indicating copy to clipboard operation
plugin-tools copied to clipboard

Create Plugin: Stop prettier from writing files outside the target path

Open jackw opened this issue 1 year ago • 1 comments

What this PR does / why we need it: This PR removes the exec working directory option in favour of passing an absolute path to prettier when writing files. It seems passing a . to prettier doesn't resolve correctly when inside the .config directory and I think it walks up the tree to find the project root (package.json) then executes. This can cause noise for developers that have plugins in repos in a nested directory or in a mono-repo when running the update command.

Which issue(s) this PR fixes:

Fixes #1131

Special notes for your reviewer:

📦 Published PR as canary version: Canary Versions

:sparkles: Test out this PR locally via:

npm install @grafana/[email protected]
# or 
yarn add @grafana/[email protected]

jackw avatar Oct 07 '24 11:10 jackw