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
Bug: [new config system] Unexpected glob behavior in FlatESLint
#16340
Comments
Only However, the patterns in that file should not ignore the This is either a bug or a surprising behavior in |
I'm getting the same behavior with the latest globby v13.1.2: // globby-test-ignore/test.mjs
import { globby } from 'globby';
const paths = await globby(["**/*"], {
ignore: ["**/globby-test-ignore/**"],
absolute: true
});
console.log(paths); // [] Is this the intended behavior? |
No wonder I can't reproduce when trying to make the reproduction smaller. (Took me a while to setup) |
Are you running the script inside |
Inside, I would expect that |
Sounds like a bug to me. But seems absolute ignore is expected? mrmlnc/fast-glob#113 |
Maybe this Prettier issue is the same reason. "Problem 2" |
I can reproduce this behavior with - }
+ },
+ {
+ ignores: ["**/eslint/**"]
+ } (my local clone is in a directory named
|
FlatESLint
FlatESLint
Can someone summarize what the problem is here? I've re-read this a couple of times and can't quite tell how to create a simple repro case. |
Here's a simplified example:
// eslint.config.js
module.exports = [{
ignores: ["**/foo/**"]
}]; Running Path to the project dir and project dir's name shouldn't matter, so the expected result is to lint Actual result:
because ignore pattern |
Got it, thank you! Working on this now |
* feat: Swap out Globby for custom globbing solution. Removes globby due to numerous issues with ignoring files and returning the correct files. Fixes #16354 Fixes #16340 Fixes #16300 * Fix failing test * Add test for 16300 * Make more tests pass * Fix another test * Add another test * Remove old test * Fix cli tests * Bump up Mocha timeout for Node 18 * Revert timeout bump * Manually use stream * clean up comment * Set concurrency back to default * Fix remaining tests * Cleanup requires
Environment
Node version: 18.8.0
npm version: N/A
Local ESLint version: 8.23.1
Global ESLint version: A/A
Operating System: Windows
What parser are you using?
Default (Espree)
What did you do?
Run
FlatESLint
with different cwd on same file.What did you expect to happen?
Should result the same.
What actually happened?
They result differently.
Participation
Additional comments
Step to reproduce:
yarn && node test.mjs
to see the differenceIt seems the
globby
option{absolute: true}
causeglobby
can't match any file.Remove that line cann't really fix my problem, but it should be another issue, possible related to #16264
Since the globby version we are using is really old, not sure what causes that. (I'm a maintainer of
globby
)The text was updated successfully, but these errors were encountered: