Ignore patterns don't work in `ignore` option
See original GitHub issueEnvironment
- OS Version: ubuntu 17.10
- Node.js Version: latest
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
- Create
file.txt
with any contents. - Create
file.yaml
with any contents.
Code sample
const fg = require('fast-glob');
fg(['**/*'], {
absolute: true,
dot: true,
ignore: [`!{**/*,*}.txt`],
onlyFiles: true
})
.then((entries) => console.log(entries));
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:16 (7 by maintainers)
Top Results From Across the Web
Ignoring Code - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >Ignore file patterns diff option does not work for untracked files
Independently of .gitignore, in the diff tab of the options menu, sourcetree has a setting to exclude certain file patterns from showing a...
Read more >Default ignore patterns in config.xml not working - Feature
There seems to be a syncthing feature “Default ignore patterns” which should address that issue about global ignore patterns.
Read more >Ignoring files by pattern - IBM
You specify additional ignore patterns for an individual project to allow the specification of a set of regular expressions to be ignored by...
Read more >gitignore Documentation - Git
Patterns which a user wants Git to ignore in all situations (e.g., ... Git does not follow symbolic links when accessing a .gitignore...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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:
This helps ensure prettier format check is comprehensive, but doesn’t repeat what eslint may already be checking.