eslint-plugin-jest-playwright
Advanced tools
Comparing version 0.2.1 to 0.3.0
{ | ||
"name": "eslint-plugin-jest-playwright", | ||
"description": "ESLint globals for your Jest Playwright setup.", | ||
"version": "0.2.1", | ||
"main": "index.js", | ||
"version": "0.3.0", | ||
"main": "lib/index.js", | ||
"repository": "https://github.com/mxschmitt/eslint-plugin-jest-playwright", | ||
"author": "Max Schmitt <max@schmitt.mx>", | ||
"license": "MIT" | ||
"license": "MIT", | ||
"files": [ | ||
"lib" | ||
], | ||
"scripts": { | ||
"test": "jest" | ||
}, | ||
"devDependencies": { | ||
"eslint": "^7.25.0", | ||
"jest": "^26.6.3" | ||
} | ||
} |
@@ -1,5 +0,19 @@ | ||
# ESLint Jest Playwright globals | ||
# ESLint Jest Playwright | ||
> ESLint globals for your [Jest](https://jestjs.io/) [Playwright](https://github.com/microsoft/playwright) ([jest-playwright](https://github.com/mmarkelov/jest-playwright/)) installation. | ||
> ESLint plugin for your [Jest](https://jestjs.io/) [Playwright](https://github.com/microsoft/playwright) ([jest-playwright](https://github.com/mmarkelov/jest-playwright/)) installation. | ||
## Installation | ||
Yarn | ||
```txt | ||
yarn add -D eslint-plugin-jest-playwright | ||
``` | ||
NPM | ||
```txt | ||
npm install -D eslint-plugin-jest-playwright | ||
``` | ||
## Usage | ||
@@ -11,20 +25,38 @@ | ||
{ | ||
"extends": [ | ||
"plugin:jest-playwright/recommended" | ||
] | ||
"extends": ["plugin:jest-playwright/recommended"], | ||
"plugins": ["jest-playwright"] | ||
} | ||
``` | ||
## Installation | ||
## Rules | ||
Yarn | ||
### `missing-playwright-expect` 🔧 | ||
```txt | ||
yarn add -D eslint-plugin-jest-playwright | ||
Enforce Jest Playwright expect statements to be awaited. | ||
#### Example | ||
Example of **incorrect** code for this rule: | ||
```js | ||
expect(page).toHaveText("text"); | ||
``` | ||
NPM | ||
Example of **correct** code for this rule: | ||
```txt | ||
npm install -D eslint-plugin-jest-playwright | ||
```js | ||
await expect(page).toHaveText("text"); | ||
``` | ||
#### Options | ||
The rule accepts a non-required option which can be used to specify custom matchers which this rule should also warn about. This is useful when creating your own async matchers. | ||
```json | ||
{ | ||
"jest-playwright/missing-playwright-await": [ | ||
"error", | ||
{ "customMatchers": ["toHaveAttribute"] } | ||
] | ||
} | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5381
5
102
62
2