style/noPlaywrightEval
style · since 2.4.2
No autofix
biome.json
{
"linter": {
"rules": {
"style": {
"noPlaywrightEval": "error"
}
}
}
}await page.$eval('.foo', el => el.textContent);const texts = await page.$$eval('.foo', els => els.map(el => el.textContent));const text = await page.locator('.foo').evaluate(el => el.textContent);const texts = await page.locator('.foo').evaluateAll(els => els.map(el => el.textContent));Examples from the Biome documentation.
No tracked preset enables this rule, so it has no reach yet.
None of the tracked presets enable this rule. Turn it on with the config below.
ESLint does not have this rule.
Oxlint does not have this rule.
style/noPlaywrightEval
style · since 2.4.2
{
"linter": {
"rules": {
"style": {
"noPlaywrightEval": "error"
}
}
}
}Disallow usage of element handles (page.$() and page.$$()).
Disallow disabling zoom with user-scalable=no in the <meta name="viewport"> element.
Disallow selecting Playwright elements by position with first(), last(), and nth().