-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
jsx-max-depth: Maximum call stack size exceeded #2880
Comments
The Not sure how to fix this one :-/ |
This can also reproduced with following: import React, { Component } from "react";
const MyComponent = () => <div />;
let ref = "";
class MyClassComponent extends Component {
updateRef(valueForRef) {
ref = valueForRef;
}
render() {
// This part is required for the crash even though reassigned value is not used
const valueForRef = ref;
return <MyComponent valueForRef={ref} />;
}
} |
This week's scheduled scan caught a case with bit more sense. Just adding this here if it helps in future: Rule: jsx-max-depth
<div className="custom_modal">
<Modal className={classes.modal} open={isOpen} closeAfterTransition>
<Fade in={isOpen}>
<DialogContent>
<Icon icon="cancel" onClick={onClose} popoverText="Close Modal" />
<div className="modal_content">{children}</div>
<div className={clxs('modal_buttons', classes.buttons)}>
<Button className="modal_buttons--cancel" onClick={onCancel}>
{cancelMsg ? cancelMsg : 'Cancel'}
</Button>
|
@AriPerkkio your case seems to already be fixed. I'll add it just in case. |
Looks good. Let's close this issue and I'll open new one if this reappears in future scans. Weekly scheduled smoke test: eslint-plugin-react #29 |
Looks like this is still valid issue. As this can be reproduced with #2880 (comment) I'll just reopen this issue. Added failing test case with minimal setup: AriPerkkio@c10a2ac |
Hello,
jsx-max-depth
rule seems to crash in certain cases. This issue was spotted by automated CI run - it is not blocking my development or anything. https://github.com/AriPerkkio/eslint-remote-tester/actions/runs/428814308I checked those other
RangerError
issues and this doesn't look like a duplicate.Minimal repro:
This is really as far minimal as I could narrow it down.
Crash reports from real projects
Rule: jsx-max-depth
Maximum call stack size exceeded Occurred while linting <text>:81
neurahealth/neuracovid/src/components/Login/index.js
The text was updated successfully, but these errors were encountered: