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
Extend .prettierignore with an "include" syntax #8288
Comments
@Stephen-ONeil I just noticed your issue after opening #8506 which proposes a different approach. @thorn0 The actual work to implement either of these proposals is likely to be very small. It is an "opt-in" feature that doesn't need to wait for a major release. Thus it would be super awesome if we can resolve this without endless months of Let's just pick a reasonable design, make a PR, and git 'er done. 😊👍👍 |
👎 On this, non standard |
This is a convincing syntax: #8506 (comment) |
@evilebottnawi raises a good point about non-standard syntax. What if |
I've got no problem with that solution, @jrnail23. I'd be happy with most of the solutions put forward in this (or any of the other related) issue threads :) To dig deep on this though, Not being intended as a cross-tool standard, importing from other ignore files is never going to be in scope for them. The only ignore files for them to acknowledge are Now, I'm not saying it's not useful to pretend ignore files are a standard. Ignoring files is a common problem, and there are many reasons to want a common solution. Not least of which, I think, is that we tend to have a common set of files to ignore across our tools in the first place. ... it'd just be a lot more useful if we didn't have to manually keep that common set of ignored files in sync. The five* open issue threads in this repo alone make it clear I'm not alone. Rejecting the premise aside, I'd like to point out that |
Let's add multiple ignore file support. #8506 (comment) |
A side note for those looking to include snippets into their ignore files: https://github.com/SlideWave/gitignore-include/ While this currently doesn't do recursive includes, thus preventing it from being super helpful in this exact situation, it is helpful for other related scenarios that will result in people looking at this issue. Additionally if/when the recursion feature is added, it would be able to solve this as you could have the Full disclosure: I'm the author of the project. |
A feature I'd love to see is the extension of the familliar
.gitignore
quasi-standard used for.prettierignore
with an include syntax. E.g.,#!include:.gitignore
as available in.gcloudignore
files.Since
.gitignore
flavoured ignore files aren't really a standard, I think it's up to individual tools to provide this additional functionality.A similar idea has been suggested (and warmly welcomed, it looks like) in #7073, with the addition of something like
to the Prettier config file syntax.
This would be a good short term way to get one of the popular features of #7073 out in the wild, and I don't think it would necessarily be bad to ultimately give users multiple ways to make ignore file includes anyway.
The text was updated successfully, but these errors were encountered: