-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
react/jsx-max-depth
false positive
#1762
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
Comments
In what context is TABLE_HEADERS used? |
It looks like this: render() {
return (
<div>
<table>
<thead>{TABLE_HEADERS}</thead>
</table>
</div>
);
} I realized that the 4 instead of 2 bit was because it measures the nesting of all elements in the file, regardless of indirection, but still the count going up is a little odd. |
Indeed, the I don't think being self-closing matters, or else the lines with two non-self-closing |
With the
react/jsx-max-depth
rule enabled with default settings, I get a false positive with the following code:It reports:
It appears that maybe there's a false positive when a tag is self-closing, but I'm also confused as to why it registers 4 instead of 2 on line 12, which maps to the first
th
tag above.The text was updated successfully, but these errors were encountered: