Closed
Description
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?
My eslint config is something like:
{
parser: '@babel/eslint-parser',
plugins: ['ramda', 'jest-dom', 'testing-library'],
extends: [
'react-app',
'airbnb',
'plugin:ramda/recommended',
'plugin:jest-dom/recommended',
'plugin:testing-library/react',
]
}