eslint-plugin-playwright icon indicating copy to clipboard operation
eslint-plugin-playwright copied to clipboard

require-hook: false warning for `test` alias

Open EvgenyOrekhov opened this issue 1 year ago • 1 comments
trafficstars

Example from the docs:

import { test as setup, expect } from '@playwright/test';

setup('authenticate', async ({ page }) => {
  // ...
});

Expected: no warning

Actual: "This should be done within a hook" warning

eslint-plugin-playwright version: 1.3.1 Node.js version: 18.19.0

EvgenyOrekhov avatar Feb 26 '24 14:02 EvgenyOrekhov

I've been making some major improvements to the internals of the plugin, and this should soon be possible.

mskelton avatar Feb 27 '24 01:02 mskelton

@EvgenyOrekhov You can now set aliases for Playwright global functions.

https://github.com/playwright-community/eslint-plugin-playwright#aliased-playwright-globals

mskelton avatar Jun 09 '24 13:06 mskelton