-
Notifications
You must be signed in to change notification settings - Fork 113
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 patterns don't work in ignore
option
#86
Comments
Hello, @evilebottnawi, You really want to use negative patterns in the |
@mrmlnc yes, i have tool which check file contents with extension and report if something wrong, i want get all files exclude some extensions which i don't support. Also |
Sounds like a feature request. JFYI: Right now you can use the following work around: const fg = require('fast-glob');
await fg(['**/*'], {
absolute: true,
dot: true,
ignore: ['{**/*,*}.txt'], // without !
onlyFiles: true
}) |
Just one question:
As I know, |
@mrmlnc yes, any nesting levels. For me it was breaking change, because |
I think this feature related to xojs/xo#65 issue. |
@reklatsmasters, I think these things are different. Based on the description of this issue – we just want to allow the use |
@reklatsmasters @mrmlnc yep, difference |
@mrmlnc problem still exists. Example usage |
@evilebottnawi, you can provide real case with FS structure ( |
@mrmlnc https://github.com/itgalaxy/file-type-lint/tree/master/src/__tests__/fixtures |
So, look like misunderstanding in the issue description :) I just let you use the negative patterns in the |
@mrmlnc Are there any news here? This feature would fix a problem with Use case:
So the full
Without this feature we'd have to list all |
@mrmlnc, I too have a situation where we want to use negative ignore patterns to allow certain files to be included in the output, which would otherwise, be excluded due to other ignore patterns. Would be great to see some progress on this! |
Another issue about this functionality — #356. Unfortunately, I could not come up with a decent algorithm that allowed me to implement this functionality without completely rewriting the pattern-matching mechanism when reading in depth. I will try again later, after the major release of this package. Most likely, it's time to reconsider the approach to how we process patterns in the pattern manager and their further application to directories. I cannot promise any specific dates. |
Negated patterns would be really nice for a package.json npm script like this: "format:check:ci:non-ts": "yarn prettier --check '**/*.{js,jsx,ts,tsx,mjs,cjs,mts,cts}'" This helps ensure prettier format check is comprehensive, but doesn't repeat what eslint may already be checking. |
Environment
Actual behavior
Ignore patterns don't work in
ignore
option.Expected behavior
Ignore patterns should be work in
ignore
option.node-glob
works perfect.Steps to reproduce
file.txt
with any contents.file.yaml
with any contents.Code sample
The text was updated successfully, but these errors were encountered: