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
eslint ignores symbolic links to files when traversing directories #13615
eslint ignores symbolic links to files when traversing directories #13615
Comments
Hi @rtpg, thanks for the issue! I think this is similar to #13551, but for files. Looks like a bug to me. Until we verify and possibly fix this, a workaround (though an inconvenient one if you have multiple symlinked files) is to explicitly list those files as command-line arguments. For example: eslint src src/file1.js That way, the |
Unfortunately, it looks like there wasn't enough interest from the team Thanks for contributing to ESLint and we appreciate your understanding. |
Reopening as this is most likely a bug. |
I'm not a Linux expert but glob expansion didn't recurse and work for extensions (like "/myrootsrc/**/*.js"). Instead I used "find" for "js" files only, in case anyone else wants a workaround (and yes it can create a long cmdline, and I don't have spaces in paths): ROOT_DIR=/myrootsrc TODO: Hack 7.x ignoring symbolic links by finding the files ourselves and passing them inROOT_DIR=$(find $ROOT_DIR -name "*.js") |
I'm interested if there are any plans to fix this |
Hey! This introduced a breaking change for me.
|
In the following code we have an
.isFile
check on aDirent
objecteslint/lib/cli-engine/file-enumerator.js
Line 429 in 091e52a
However the node documentation says the
isFile
check is for if the file is a regular file, and returns false on symbolic links.This makes it hard to run eslint against sandboxed bazel files, for example (since the sandboxing happens through symlinks)
Not 100% sure what's best here but "not a directory" feels like a nicer check here than "is a regular file". Might be a bit impossible to resolve.
The text was updated successfully, but these errors were encountered: