Registry / testing / eslint-plugin-wdio

eslint-plugin-wdio

JSON →
library9.27.0jsnpmunverified

An ESLint plugin providing WebdriverIO-specific lint rules to catch common mistakes like missing await on expect calls, debug statements left in code, and floating promises. Version 9.27.0, part of the WebdriverIO v9 monorepo, follows ESLint v9 flat config spec. Ships TypeScript types. Key differentiator: integrates with @typescript-eslint to replace generic await-expect rule with no-floating-promise for type-aware checking. Requires ESLint ^9.39.2, globals ^16.5.0, and typescript-eslint ^8.54.0 as peer dependencies. Release cadence: active, multiple minor releases per month.

npm install eslint-plugin-wdio
INSTALL
IMPORT
SIG · ESLINT-PLUGIN-WDIO
E
eslint-plugin-wdio
testingjavascriptv9.27.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

configs
import { configs } from 'eslint-plugin-wdio';
const configs = require('eslint-plugin-wdio').configs;
ESM-only since v9. Use named import from package; CommonJS require may not work as expected with the flat config export.
rules
import { rules } from 'eslint-plugin-wdio';
const rules = require('eslint-plugin-wdio').rules;
Access individual rules programmatically. Ensure ESLint v9 flat config environment.
flat/recommended
import { configs } from 'eslint-plugin-wdio'; export default [ configs['flat/recommended'] ];
export default [ { extends: ['plugin:wdio/recommended'] } ];
ESLint v9 uses flat config. The old .eslintrc extends syntax is not supported. Use configs['flat/recommended'] from the plugin.

Shows how to configure eslint-plugin-wdio with ESLint v9 flat config, enabling recommended rules and customizing no-pause/no-debug.

// eslint.config.mjs import { configs as wdioConfig } from 'eslint-plugin-wdio'; import js from '@eslint/js'; export default [ js.configs.recommended, wdioConfig['flat/recommended'], { rules: { 'wdio/no-pause': 'warn', 'wdio/no-debug': 'error', } } ];
Debug
Known issues
breakingESLint v9 flat config is required starting from eslint-plugin-wdio v9. Legacy .eslintrc format is not supported.
fix
Migrate to flat config: use eslint.config.mjs and import { configs } from 'eslint-plugin-wdio' to get the recommended config.
affects: >=9.0.0
deprecatedThe 'wdio/await-expect' rule is deprecated in favor of 'wdio/no-floating-promise' when using TypeScript with @typescript-eslint.
fix
Install typescript-eslint and use 'wdio/no-floating-promise' instead; the recommended config auto-switches if typescript-eslint is detected.
affects: >=9.0.0
gotchaCommonJS require() may not load the plugin correctly with flat config. Use ES module import.
fix
Set 'type': 'module' in package.json or use .mjs extension for config file and use import syntax.
affects: >=9.0.0
gotchaThe plugin peer dependency on globals ^16.5.0 must be satisfied; otherwise ESLint may fail to resolve globals.
fix
Run 'npm install globals@^16.5.0 --save-dev'.
affects: >=9.0.0
gotchaIf using TypeScript, the recommended config automatically replaces 'wdio/await-expect' with 'wdio/no-floating-promise', but this requires @typescript-eslint/eslint-plugin and typescript installed.
fix
Install 'typescript' and '@typescript-eslint/eslint-plugin' as dev dependencies.
affects: >=9.0.0
Errors
Common errors & fixes
Error: Failed to load plugin 'wdio' declared in 'plugins': Cannot find module 'eslint-plugin-wdio'
eslint-plugin-wdio is not installed or not in node_modules.
fix
Run 'npm install eslint-plugin-wdio --save-dev'.
TypeError: configs is not iterable
Importing configs object directly without accessing the correct key, or using CommonJS require() on an ESM-only export.
fix
Use: import { configs } from 'eslint-plugin-wdio'; export default [ configs['flat/recommended'] ];
Configuration for rule 'wdio/await-expect' is invalid: has no 'meta' property
Trying to use the old .eslintrc extends syntax with a flat config file.
fix
Switch to flat config format: export default [ ... ] and use configs['flat/recommended'].
Upgrade
Version history
9.27.0latest on npm
Audit
Dependencies
eslintrequiredPeer dependency: required to run ESLint plugin
globalsrequiredPeer dependency: provides global variable definitions for ESLint
typescript-eslintoptionalPeer dependency: required for type-aware no-floating-promise rule and TypeScript support
Agent activity
2 hits · last 30 days
node
2
Resources