Rayrun
← Back to Discord Forum

eslint rules conflict

robertskaarposted in #help-playwright
Open in Discord

In my eslint.json

I have a rules config

{ … “Rules”:{ … } }

My ryles for testing library also implements for playwright, so my rule: “Testing-library/prefer-screen-queries”: “error” Gives errors in playwright because that uses page and not screen for the test how can i differentiate this rule correctly ?

Thanks in advance ! 🙌🏻🤞🏻

This thread is trying to answer question "How can I differentiate the 'Testing-library/prefer-screen-queries' rule in eslint that is causing errors in playwright?"

2 replies

use overrides or separate eslint config for each folder assuming your playwright test and other things you're linting are separated

@skorp32: Thanks alot, havent used overrides before they did the trick 🙌🏻

Thanks alot, havent used overrides before they did the trick 🙌🏻

Related Discord Threads

TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email luc@ray.run.