Registry / testing / eslint-plugin-webdriverio

eslint-plugin-webdriverio

JSON →
library1.0.1jsnpmunverified

ESLint plugin that provides environment settings for WebdriverIO globals (browser, $, $$). Current stable version is 1.0.1. It is a small, focused plugin that adds a custom environment 'webdriverio/wdio' to ESLint, preventing no-undef errors when using WebdriverIO's globally available helpers. Unlike generic globals configuration, this plugin allows granular control by scoping to the 'wdio' environment, making it easy to combine with other environments like Mocha. Primarily used in WebdriverIO test projects.

testing
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

ESLint plugin names are specified without the 'eslint-plugin-' prefix.

plugins: ['webdriverio']

The environment key includes the plugin name prefix, as 'webdriverio/wdio'.

env: { 'webdriverio/wdio': true }

Inline environment directives must also use the full 'webdriverio/wdio' name.

/* eslint-env webdriverio/wdio */

Shows how to configure ESLint with the webdriverio environment to avoid no-undef errors for WebdriverIO globals.

// .eslintrc.json { "plugins": ["webdriverio"], "env": { "webdriverio/wdio": true, "mocha": true } } // test.spec.js /* eslint-env webdriverio/wdio, mocha */ describe('My test', () => { it('should work', () => { browser.url('https://example.com'); const heading = $('h1'); console.log(heading.getText()); }); });
Debug
Known footguns
gotchaEnvironment must be 'webdriverio/wdio' not just 'wdio'
gotchaPlugin name in plugins array must be 'webdriverio' not 'eslint-plugin-webdriverio'
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
10 hits · last 30 days
claudebot
4
gptbot
3
ahrefsbot
3
Resources