prettier-vscode: .prettierignore is not working

I know it has been a long awaited feature but I can’t seem to make it work.
I have a simple .prettierignore config that is consumed and applied as expected from cli, but the extension keeps formatting files in the editor.

app/modules/
app/root/
app/utils/
webpack/
tools/
config/
server/
package.json

prettier is installed globally in my setup

❯ prettier --v
1.8.2

❯ code --version
1.18.1
929bacba01ef658b873545e26034d1a8067445e9

Am I doing anything wrong? Is there any way I can log extension formatting for debug purposes?

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 9
  • Comments: 22 (4 by maintainers)

Most upvoted comments

2019, and .prettierignore still not working…

I mean, I’m all in for 👎’ing an unhelpful comment as the next developer, but this really doesn’t work. prettier@1.18.2. Trying ignore an xml file in the root of my app. These don’t work:

config.xml
/config.xml
./config.xml
*.xml

What am I doing wrong?

Has this been moved to another issue? .prettierignore still does not seem to be working.

Not working for me either - I can’t get either .prettierignore or // prettier-ignore to work for me.

This works for me

Prettier: Ignore Path (in vscode)
~/.prettierignore

Contents of ~/.prettierignore

**/folder-to-exclude/**/*

For me the problem was the I had another beautifier (“Beautify”) installed which formatted the code on save. The problem could be solved by disabling it and reloading vs studio code #440 #439

It is not working for me either

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.

Still not working for me. Format on save doesn’t respect the .prettierIgnore file.