Closed rjkz808 closed 4 years ago
I understand that it can be fixed by disabling the whole extension for specific workspaces, but current solution is to use prompt, which unfortunately still keeps Deno formatting enabled
Hey! Will this issue be solved?
@rjkz808 sorry, I am too busy this week. but it has not been fixed yet
Is it possible for the extension to respect a .prettierrc file in the project path? I'm working on multiple projects each of which have different .prettierrc settings, and while I applaud having an official deno format for public modules, private or custom projects that needs to live with existing Typescript/Javascript code bases should follow a .prettierrc specification. Maybe default to the deno format unless a .prettierrc file exists in the project path? That would satisfy all scenarios.
No, defaulting to format via deno unless a prettierrc does not satisfy all scenarios as there are many ways prettier can be configured.
Not touching the files at all would be a better default. axetroy already fixed this in that version.
Duplicate of #193
@lucacasonato even with 193 solved, this issue remains, namely that there is a conflict with the Prettier extension when this extension is installed. By default, this extension overrides the user's formatting preferences for JavaScript and TypeScript files.
Therefore I disagree that this is a duplicate of the newer issue unless that behavior has been removed.
By default, this extension overrides the user's formatting preferences for JavaScript and TypeScript files.
I can not reproduce this.
Google brought me here. I had some sort of conflict between formatters (prettier vs deno) and solved it with this (found in #193):
{
"deno.enable": true,
"deno.lint": true,
"deno.unstable": true,
"[typescript]": { // <= ADDED THIS.
"editor.defaultFormatter": "denoland.vscode-deno"
}
}
This goes in the project's .vscode/settings.json
.
I've find out that even if Deno extension is disabled, my JS/TS code is still being formatted according to Deno rules. So, if there's a Node.js project which uses Prettier (and has required configuration), VSCode uses Deno extension to format all the code instead of Prettier. It is unexpected behavior for cases when Deno extension is explicitly disabled.