Prettier-vscode: .prettierignore pattern to ignore an entire folder

Created on 19 Dec 2017  路  9Comments  路  Source: prettier/prettier-vscode

I have some folders I want to disable prettier completely, and let it run on other folders with formatOnSave.
tried to add .prettierignore with **/* and **/ with no effect - prettier still formats the code.
What can I do to make this work?

locked need more info

Most helpful comment

For me it doesn't, only works if I open a workspace.
Maybe it's a bug.
Using Ubuntu 16.04, vscode 1.19.1

All 9 comments

What do you mean by _folder_ ?
You can disable the extension for certain workspace.
Try with **

If I put .prettierignore at a folder root and open it using 'open folder' it doesn't get picked up by the extension?

By default it picks up .prettierignore in your opened folder yes.

I've placed a .prettierignore in a folder with ** like you said (thanks).
If I open my project via file-->open workspace... the extension uses .prettierignore
but if I open my project via file-->open folder, the extension doesn't use .prettierignore and the code is getting prettified in unwanted places (such as python templates).

I usually don't use workspaces, just folders and 'open folder'.
Is there a way to make the extension use .prettierignore when opening a folder, without opening a workspace?

I don't get it, If I do Open folder, vscode opens a workspace with one folder and prettierignore works as expected.

For me it doesn't, only works if I open a workspace.
Maybe it's a bug.
Using Ubuntu 16.04, vscode 1.19.1

I have the same issue: vscode 1.21.1, MacOS 0.13.3

This issue has been automatically closed because there has been no response to our request for more information from the original author. Currently, there is not enough information provided for us to take action. Please reply and reopen this issue if you need additional assistance.

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

GantMan picture GantMan  路  3Comments

sebastijandumancic picture sebastijandumancic  路  4Comments

FlorianWendelborn picture FlorianWendelborn  路  3Comments

Tanmccuin picture Tanmccuin  路  3Comments

bardware picture bardware  路  4Comments