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
ext
does not work as expected
#7939
ext
does not work as expected
#7939
Comments
P.S. You don't need to pass |
let lint = new CLIEngine({ extensions });
let files = execSync('git diff --relative --name-only --diff-filter=AM HEAD', {
encoding: 'utf8'
});
files = files.split(/\n/);
files = files.filter(file => {
let { ext } = path.parse(file);
return file.trim() && extensions.includes(ext);
});
let report = lint.executeOnFiles(files); Not so comfortable for me :( |
We definitely can't change this behavior as it would be a major breaking change that would affect a lot of users out there. We could possibly add another flag for what you are describing. We would need teams opinion on this. But from my perspective, this seems a bit too edge-casey for my taste. This behavior has been around for 3 years now, and we haven't seen too many complains/requests for it, which is telling me that very few people need something like that. We usually try to avoid adding situational feature to ESLint that would only affect a few people. |
I agree that it might not be worth doing a breaking change for this-- if, in fact, this would be a breaking change. Here's how I understand the behavior of this option-- let me know if I'm wrong:
If I'm understanding the requested change, the goal is to have Arguments in favor of making this change:
That said, since there is a workaround, I'm not strongly in favor of making the change. I just think it's less "breaking" than originally thought. |
@ilyavolodin, @platinumazure thanks for your explanation. I see what you mean. Please close this issue if you see fit. |
Yeah, I don't think this is a big enough use case that we should implement a change. Maybe there's something we can do in the docs to explain this more clearly? |
Actual
Expected
package.json
should be ignoredThe text was updated successfully, but these errors were encountered: