-
Notifications
You must be signed in to change notification settings - Fork 242
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
Error: Reference unexpected had more than one definition - please file a github issue #1108
Comments
Thanks for submitting this, I'll get a fix out ASAP.
two things:
@kukhariev & @diegohaz can you confirm if you're hitting this on the same kind of code? (function overloads) I also just realised I can produce this with duplicate imports:
|
@G-Rath I don't have time to investigate the issue right now, but here's the log if it's helpful: https://github.com/ariakit/ariakit/runs/6433896824?check_suite_focus=true |
I see: Oops! Something went wrong! :(
ESLint: 8.15.0
Error: Reference unexpected had more than one definition - please file a github issue at https://github.com/jest-community/eslint-plugin-jest
Occurred while linting E:\Documents\GitHub\node-uploadx\packages\core\src\handlers\base-handler.ts:150
Rule: "jest/expect-expect"
at collectReferences (E:\Documents\GitHub\node-uploadx\node_modules\eslint-plugin-jest\lib\rules\utils.js:589:15)
at resolveToJestFn (E:\Documents\GitHub\node-uploadx\node_modules\eslint-plugin-jest\lib\rules\utils.js:630:22)
at isTestCaseCall (E:\Documents\GitHub\node-uploadx\node_modules\eslint-plugin-jest\lib\rules\utils.js:425:10)
at CallExpression (E:\Documents\GitHub\node-uploadx\node_modules\eslint-plugin-jest\lib\rules\expect-expect.js:96:40)
at ruleErrorHandler (E:\Documents\GitHub\node-uploadx\node_modules\eslint\lib\linter\linter.js:1114:28)
at E:\Documents\GitHub\node-uploadx\node_modules\eslint\lib\linter\safe-emitter.js:45:58
at Array.forEach (<anonymous>)
at Object.emit (E:\Documents\GitHub\node-uploadx\node_modules\eslint\lib\linter\safe-emitter.js:45:38)
at NodeEventGenerator.applySelector (E:\Documents\GitHub\node-uploadx\node_modules\eslint\lib\linter\node-event-generator.js:297:26)
at NodeEventGenerator.applySelectors (E:\Documents\GitHub\node-uploadx\node_modules\eslint\lib\linter\node-event-generator.js:326:22)
error Command failed with exit code 2. https://github.com/kukhariev/node-uploadx/blob/master/packages/core/src/handlers/base-handler.ts |
thanks for that - @diegohaz that file has function overloading, so it looks like the same cause. @kukhariev yours is slightly different as it's declaration merging (interface + class) but has the same outcome as function overloading so that's good. I'll merge #1109 in a few minutes once CI has passed, which'll fix this :) |
🎉 This issue has been resolved in version 26.2.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@G-Rath @kukhariev @diegohaz wow, that was super quick. We're able to update to the latest release 🙌 🥳 Thank you! |
I don't quite understand what's going on but since the latest update from ^26.1.5 -> ^26.2.1 I see the following error:
We're using typescript and method overloading on line 38 in the mentioned file:
I see this was introduced in #1094 here https://github.com/jest-community/eslint-plugin-jest/pull/1094/files#diff-1c5ed711c5adf38f4dfb60de69d029f944e90550f85ea37e087482ccbc884e91R899
I just can't get my head around this section. @G-Rath what do you mean with
ref unexpected
?Eslint configuration file
The text was updated successfully, but these errors were encountered: