New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ignore spesific files #2195
Comments
This is something that we need to solve indeed. I'm not really sure at which level but will be worked on in the coming weeks. |
/* eslint-disable prettier/prettier */ I don't know how you get simpler than that. |
I had same question #1977 |
@vjeux Cool. Nice to hear you are aware and thinking about it. :) @chadly Yeah that is not bad if you allready have eslint set up. But I use prettier from my editor and many files are not in a project with eslint so that would need to be set up for all 70+ project I have on my work machine, which does not scale or make sense (for me at least). Other files are not part of a project but standalone files where some of them should not be formatted. Maybe there are other ways to set it up other than per project? Do I need do stop using Prettier through the editor? Weird example: Fiddler custom rules scripts file which is JS but not quite (FiddlerScript). This language does not support the @jitendravyas Ah. Nice. I did not see that one. Though my use case is a bit different it does make a case for some kind of ignore mechanism in Prettier. Obviously I would like a solution to contain some kind of comment support so I can ignore the files that create probles for me. |
Prettier already has |
@azz ooO! That is nice! But it means I failed to read the manual. π |
The next release will support |
@azz when will this be supported exactly please? or what version should I watch for? Thanks never mind :) I've found it's version 1.6 |
Hi!
First: Thank you for creating and maintaining Prettier! πββοΈ It is a great resource for the community!
I would love to see support for ignoring spesific files. I know there are ways to to this by using eslint but it is a bit more complex then I would like.
I have situations where I would like to be able to put a comment at the top of the file and it would be ignored (kind of like eslint). I use prettier mostly as an editor integration so I guess this could be done in the editor plugins but it seems like quite a lot of work for the plugins to do when prettier is already parsing the files.
There are more and more cases where I would like to ignore one or to files in a project or just single js-files that is not part of a project. I find my self having to disable prettier when editing certain files (and then re-enable it) or remember to use another editor for those files.
Having project spesific config like the discussed somewhere in issue #98 combined with config option to ignore files would solve most of my cases but I would like to have an in-file comment version as well.
Is this something you would consider?
The text was updated successfully, but these errors were encountered: