prettier / prettier-vscode

Visual Studio Code extension for Prettier
https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode
MIT License
5.04k stars 446 forks source link

Deno support #3330

Open OzzieOrca opened 2 months ago

OzzieOrca commented 2 months ago

Is your feature request related to a problem? Please describe. Do you have any suggestions for using the VS Code Prettier extension in a Deno project (which doesn't have package.json or node_modules) and specifying a specific version to match the project?

We're able to run Prettier as a script locally and on CI with these tasks configured in deno.jsonc:

{
  "tasks": {
    "prettier:check": "deno run --allow-read --allow-sys=uid --allow-env=TMPDIR,TMP,TEMP,HOME 'npm:prettier@3.2.5' . --list-different",
    "prettier:write": "deno run --allow-read --allow-sys=uid --allow-env=TMPDIR,TMP,TEMP,HOME --allow-write 'npm:prettier@3.2.5' . --write"
  }
}

but Deno's Prettier install isn't resolved by this extension.

Describe the solution you'd like It would be nice to have the extension resolve the version of Prettier installed by Deno or be able to pick a fallback version.

Describe alternatives you've considered I've tried installing Prettier with npm up a directory or globally installing it and enabling Prettier: Resolve Global Modules but couldn't seem to get the extension to resolve that Prettier instance.

Additional context I'd assume that other frameworks without npm or things like Yarn PnP would have similar issues.

github-actions[bot] commented 2 weeks ago

This issue has been labeled as stale due to inactivity. Reply to keep this issue open.

OzzieOrca commented 2 weeks ago

As far as I'm aware this hasn't been addressed or triaged. It would be nice if this extension worked as well with Deno as it does with a project containing a package.json file or there was explicit config for resolving prettier without a package.json.