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?
Was just going to open this same one. I have:
apps/**/package.json
packages/**/package.json
But saving any package.json inside one of those folders doesn't work.
The same problem..
@azz
.prettierignore is stored in the root of the project. And inside of it I've tried package.json or whole folder src/ even paths to the specific files but nothing works as expected.the same
.prettierignore and .prettierrc are both in the root of the projectQuickly tested,
Seems we need to pass a relative to .prettierignore path instead of an absolute path
https://github.com/prettier/prettier-vscode/blob/master/src/ignoreFileHandler.ts#L24
Currently works well for simple ignore which starts with a * like
**/a/b/x.js*.js@CiGit yep, that works. wildcards could be a workaround for now
Something like #280? Unable to reproduce locally but I must be doing something wrong.
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. [email protected]. 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?
Definitely not working.
.prettierrc contents of:
db/entities/*
prettier output complains of:
db/entities/store_items.js
5:63 error Expected a conditional expression and instead saw an assignment no-cond-assign
@bdares where'd you snag that output?
Yeah, it appears that .prettierignore does not work at all for me either in a monorepo. Prettier goes through everything in node_modules. I've even tried adding .eslintignore which did not help.
I'm hoping that these changes land https://github.com/prettier/prettier/pull/6203/files and will fix the problems my team is having.
Not working for me either - I can't get either .prettierignore or // prettier-ignore to work for me.
Has this been moved to another issue? .prettierignore still does not seem to be working.
It is not working for me either
Still not working for me. Format on save doesn't respect the .prettierIgnore file.
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
We have changed how the ignore files are processed and resolved, if somebody has a chance please try to repro this with the preview of version 3.0: https://marketplace.visualstudio.com/items?itemName=Prettier.prettier-vscode
Also, if somebody can provide a github repro sample i can use to reproduce this issue, that would help as well.
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 works for me
Prettier: Ignore Path (in vscode)
~/.prettierignore
Contents of ~/.prettierignore
**/folder-to-exclude/**/*
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.
Most helpful comment
2019, and .prettierignore still not working...