-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Should not be an error: No files matching the pattern "entry.js" were found. #1659
Comments
Where does the config live exactly, and where does |
the config lives in the root folder and |
ok, so the path to |
Yes, it works now. But I was hoping that it'd just ignore if it can't find the file. Because I want the config to be shared among different projects that not always will follow the same file name and path structure. |
In that case each project needs to define it themselves, which is all the more reason not to try to put that in the shared config. I don't think silently ignoring things is a good approach. |
@ljharb, it's however pretty standard practice to have configurations silently ignore files that do not exist: In our projects, some have a It does seem counter-intuitive to me, and the opposite of what most tools out there accustomed us to. Would you be open to reconsider your position on this? :) |
@astorije you're right about the common practice, for sure - altho that's probably caused more bugs than most, which is why I think it's reasonable in this case, however, that as long as at least one file is found in |
I agree with you that Until this behavior changes, we will not be able to use this rule organization-wide unfortunately, and I wouldn't be surprised if other teams that have shared configurations encountered the same issue. |
I'd be happy to accept a PR that implemented the semantics I described. Would that address your use case? It seems like it would address the OP's as well. |
I don't believe so. Given the following configuration: ignoreExports:
- webpack.config.ts The shared configuration would fail on projects that have no |
Hmm, understood. I suppose it makes sense to avoid the error in cases like this. |
The https://eslint.org/docs/user-guide/command-line-interface#no-error-on-unmatched-pattern |
Even better - if we can detect when that flag is passed, then we’d be able to follow it. |
Due to rule:
I get the error:
If I dont have an "entry.js" file, it should just ignore it and move on.
However, I get the error even if I have an "entry.js" file :(
The text was updated successfully, but these errors were encountered: