"The prop value with an expression type of AssignmentExpression could not be resolved."
See original GitHub issueError trace:
The prop value with an expression type of AssignmentExpression could not be resolved.
Please file issue to get this fixed immediately.
Error: The prop value with an expression type of AssignmentExpression could not be resolved.
Please file issue to get this fixed immediately.
at extract (jsx-ast-utils\lib\values\expressions\index.js:175:11)
at Object.extractValueFromLogicalExpression [as LogicalExpression] (jsx-ast-utils\lib\values\expressions\LogicalExpression.js:28:38)
at Object.extract [as JSXExpressionContainer] (jsx-ast-utils\lib\values\expressions\index.js:178:21)
at getValue (jsx-ast-utils\lib\values\index.js:48:27)
at extractValue (jsx-ast-utils\lib\getPropValue.js:24:12)
at getPropValue (jsx-ast-utils\lib\getPropValue.js:41:10)
at eslint-plugin-jsx-a11y\lib\rules\no-static-element-interactions.js:79:95
at Array.some (native)
at EventEmitter.JSXOpeningElement (eslint-plugin-jsx-a11y\lib\rules\no-static-element-interactions.js:75:52)
After stepping through I’ve found the culprit in the onClick
assignment here:
this._options.map((config, key) => <DropdownBox.Item key={key}
onClick={this._cachedOnClickItemHandlers[key] ||
(this._cachedOnClickItemHandlers[key] = this._onClickItem.bind(null, config))}>
{config.label}
</DropdownBox.Item>)
Yeah, not the nicest code, but I guess this shouldn’t break eslint
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
The prop value with an expression type of ... - GitHub
"The prop value with an expression type of SequenceExpression could not be resolved. Please file issue to get this fixed immediately." .
Read more >I am getting this error: The prop value with an expression type ...
I am getting this error: The prop value with an expression type of Chain Expression could not be resolved. Please file is Failed...
Read more >jsx-ast-utils | Yarn - Package Manager
Returns the JSXAttribute itself or undefined, indicating the prop is not present on the ... to expression types to handle recursively extracting prop...
Read more >Expressions - C# language specification - Microsoft Learn
The assignment operator itself (=) cannot be overloaded. An assignment always performs a simple store of a value into a variable (§11.19.2).
Read more >Top 5 babel-traverse Code Examples - Snyk
i}`) // get prop-types if (cPath.isExpressionStatement() && node.expression.type === 'AssignmentExpression') { let leftNode = node.expression.left if ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That makes sense. I hadn’t thought about it that way. Thanks for reopening them.
Also happens with
+=
, e.g.:I found something like this in our codebase that was causing this message. It turned out to be a minor bug (was supposed to be
+
).Would it be possible to display the file/line where the error happened when this error is logged?