You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was tempted to suggest an option like allowedProperties where you could specify all the properties needed, but that could be use as an escape hatch. So my proposal is to add a new allowContainerFirstChild option, which would be a boolean to prevent reporting container.firstChild. What do you think?
What about no-container? Does that rule complain about container.firstChild?
What rule do you want to change?
no-node-access
Does this change cause the rule to produce more or fewer warnings?
Fewer warnings
How will the change be implemented?
render
method returns container which has content rendered inside it (div
element by default - docs )The easiest way to access content itself is by using
firstChild
propertyThis is hardly avoidable in some cases, such as:
The rule could ignore
firstChild
(only?) in some cases.Example code
How does the current rule affect the code?
Currently rule highlights
container.firstChild
part as a mistaken direct Node accessHow will the new rule affect the code?
Won't highlight it
Anything else?
No response
Do you want to submit a pull request to change the rule?
No
The text was updated successfully, but these errors were encountered: