webdriverio/packages/eslint-plugin-wdio
WebdriverIO Release Bot ff2154c00e v9.16.2
2025-06-23 19:10:14 +00:00
..
docs/rules feat(eslint): Add support for multiple browser instances in eslint rules (#14188) 2025-02-14 11:41:30 -08:00
src feat(eslint): Add support for multiple browser instances in eslint rules (#14188) 2025-02-14 11:41:30 -08:00
tests feat(eslint): Add support for multiple browser instances in eslint rules (#14188) 2025-02-14 11:41:30 -08:00
.npmignore eslint-plugin-wdio: add cjs build (#9325) 2022-12-06 02:53:45 +01:00
LICENSE fix(docs): change file name of license from LICENSE-MIT to just LICENSE 2024-08-05 11:24:13 -07:00
package.json v9.16.2 2025-06-23 19:10:14 +00:00
README.md feat(eslint): Add support for multiple browser instances in eslint rules (#14188) 2025-02-14 11:41:30 -08:00
tsconfig.json Improve implementation of the new eslint rules (#8095) 2022-03-10 15:25:11 +01:00

eslint-plugin-wdio

ESLint rules for WebdriverIO

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install eslint-plugin-wdio:

npm install eslint-plugin-wdio --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-wdio globally.

This plugin export a recommended configuration that enforce good practices.

With Eslint v8 and below

To enable this configuration use the extends property in your .eslintrc config file:

{
    "plugins": ["wdio"],
    "extends": [
        "eslint:recommended",
        "plugin:wdio/recommended"
    ]
}

With Eslint v9 and Flat Config

If you are using the latest version of Eslint with the flat configuration, you can embed this plugin as follows:

// eslint.config.mjs
import { configs as wdioConfig } from "eslint-plugin-wdio";

export default [
    {
        extends: [
            wdioConfig['flat/recommended'],
            // ...
        ]
    }
];

See ESLint documentation for more information about extending configuration files.

List of supported rules

expect calls must be prefixed with an await

Don't allow browser.debug() statements

Don't allow browser.pause(<number>) statements