Skip to content

Commit f3d199e

Browse files
committed
fix: refine simulator exclusion logic to address false positives
1 parent 934bc5e commit f3d199e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/rules/no-node-access.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,12 @@ export default createTestingLibraryRule<Options, MessageIds>({
7373
ALL_PROHIBITED_MEMBERS.some(
7474
(allReturningNode) => allReturningNode === propertyName
7575
) &&
76-
!EVENTS_SIMULATORS.some((simulator) => simulator === objectName)
76+
![
77+
...EVENTS_SIMULATORS,
78+
// TODO: As discussed in https://github.com/testing-library/eslint-plugin-testing-library/issues/1024, this is just a temporary workaround.
79+
// We should address the root cause and implement a proper solution instead of explicitly excluding 'user' here.
80+
'user',
81+
].some((simulator) => simulator === objectName)
7782
) {
7883
if (allowContainerFirstChild && propertyName === 'firstChild') {
7984
return;

0 commit comments

Comments
 (0)