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
4.18.2 - "Cannot read property 'type' of undefined" in no-unused-vars when checking flow type definitions #10090
Comments
When you tested it with 4.18.1 did you use the same version of |
@ilyavolodin If I had to guess, this was caused by the refactoring in core that went into 4.18.2. It might have changed something about how scope analysis is resolved. |
Incidentally, this seems to be the same error that redux is showing in eslint-canary. I'm going to do a quick bisect to try to learn more. |
@tomasz-sodzawiczny I can't reproduce on my machine. Am I doing something wrong? I created a subdirectory in the eslint repo and created these files:
The last is intended to be a script for bisecting, run after checking out a commit. I've run it on both latest master and on the v4.18.2 tag, with the expectation that linting should fail/crash. Just in case my bash skills are rusty, I've also run ESLint directly, outside the script (using the same Have I missed something? |
This is also the error that was occurring in #9762 (where scope analysis with |
@platinumazure @not-an-aardvark Ugh, OK, I tried to reproduce that in an isolated setup and I found the issue - it's not with eslint, it's problem with yarn workspaces, false alarm. In case some has the same thing: it seems when using yarn workspaces eslint binary might run against a different Sorry I wasted your time. :( |
I've created #10100 to add some extra debugging output that might come in handy in similar situations in the future. |
Closing this issue since it turned out to not be a bug. Thanks for the report regardless -- I think we have room for improvement in helping the user debug this type of issue. |
Tell us about your environment
What parser (default, Babel-ESLint, etc.) are you using?
babel-eslint@8.2.2
Please show your full configuration:
Configuration
What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.
The issue only occures for files where a result type is defined for an arrow function:
What actually happened? Please include the actual, raw output from ESLint.
It works correctly in
4.18.1
!The text was updated successfully, but these errors were encountered: