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
As soon as I access children on an arbitrary object, the error testing-library/no-node-access is triggered, even when testing-library is not used in this file. It's not even in a test file. So essentially adding a new file with content:
const zone = {};
console.log(zone.children);
and then running eslint on it fails with message Avoid direct Node access. Prefer using the methods from Testing Library.
I have seen the utility isTestingLibraryImported but can't find if it's actually used anywhere. Or am I missing something?
Hi @flip-it! I recommend you to read this thread, so you can find more context about how to lint only your test files and what improvements we are gonna apply to clarify this situation.
As soon as I access
children
on an arbitrary object, the errortesting-library/no-node-access
is triggered, even when testing-library is not used in this file. It's not even in a test file. So essentially adding a new file with content:and then running eslint on it fails with message Avoid direct Node access. Prefer using the methods from Testing Library.
I have seen the utility
isTestingLibraryImported
but can't find if it's actually used anywhere. Or am I missing something?My eslint config is something like:
The text was updated successfully, but these errors were encountered: