Skip to content
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

Merge support #1

Closed
coderaiser opened this issue Dec 14, 2023 · 5 comments
Closed

Merge support #1

coderaiser opened this issue Dec 14, 2023 · 5 comments

Comments

@coderaiser
Copy link

coderaiser commented Dec 14, 2023

Could you please tell me is merge supported? Similar to this one:

tmp
**/coverage
!**/coverage

It was merged to:

tmp
@fabiospampinato
Copy link
Owner

If I'm understanding what you are asking for: ignore files are not optimized to remove kinda self-cancelling rules like that, but if you repeat those 2 lines 1 million times they won't slow down matching because they end up populating the same nodes internally, like they kinda overwrite each other, so I guess there is some kind of implicit merging.

@coderaiser
Copy link
Author

I’m talking not about slowdown, but about overriding ignore. It useful when something was ignored by default and you want to stop ignoring it. How it will work right now for such case:

**/coverage
!**/coverage

coverage is ignored or not when it used by your library?

@fabiospampinato
Copy link
Owner

Coverage would be not ignored in that scenario with this library. Unless the library is buggy we try to parse ignore files like git would.

@coderaiser
Copy link
Author

OK, I tried it, it works good:

**/coverage
!**/coverage

coverage ignored and:

!**/coverage
**/coverage

coverage not ignored. Is it possible to produce CommonJS? I need to use this library inside ESLint plugin which is sync CommonJS only.

@fabiospampinato
Copy link
Owner

Sorry I've moved fully to ESM to avoid all the complications with supporting both at the same time. You can bundle it to CJS inside your package or something if you really need to import it synchronously 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants