style/noPlaywrightElementHandle
style · since 2.4.2
Unsafe autofix
biome.json
{
"linter": {
"rules": {
"style": {
"noPlaywrightElementHandle": "error"
}
}
}
}Disallow usage of element handles (page.$() and page.$$()).
const button = await page.$('button');const buttons = await page.$$('.btn');const element = await frame.$('#element');const button = page.locator('button');
await button.click();const buttons = page.locator('.btn');
await expect(buttons).toHaveCount(3);await page.getByRole('button', { name: 'Submit' }).click();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/noPlaywrightElementHandle
style · since 2.4.2
{
"linter": {
"rules": {
"style": {
"noPlaywrightElementHandle": "error"
}
}
}
}Disallow disabling zoom with user-scalable=no in the <meta name="viewport"> element.
Disallows defining React components inside other components.