Open
Description
Have you read the Troubleshooting section?
Yes
Plugin version
v5.10.2
ESLint version
v8.16.0
Node.js version
v16.20.1
package manager and version
yarn 1.22.19
Operating system
macOS Monterey
Bug description
import { screen as rtlScreen } from '@testing-library/react-native';
...
rtlScreen.getByText(...); // fails
Steps to reproduce
- enable the prefer-screen-queries lint rule
- import screen, but rename it
- observe that the lint rule still errors
Error output/screenshots
No response
ESLint configuration
N/A
Rule(s) affected
prefer-screen-queries
Anything else?
No response
Do you want to submit a pull request to fix this bug?
No