Skip to content

[πŸ’‘ Feature]: Add plugin.meta to eslint-plugin-wdio for ESLint v9 / oxlint compatibilityΒ #15149

@AleksandrSl

Description

@AleksandrSl

Description

eslint-plugin-wdio currently exports only { configs, rules } at its root β€” it does not include a meta property on the plugin object.

The ESLint v9 plugin specification designates plugin.meta (containing name and version) as the standard location for plugin identity metadata. While ESLint itself treats meta as optional and falls back to root-level name/version, tools that consume plugins via the ESLint API may depend on plugin.meta being present.

Impact

oxlint JS plugins alpha

oxlint recently shipped a JS plugins alpha (v0.16+) that allows loading standard ESLint plugins. Its internal getPluginName function reads plugin.meta directly:

TypeError: Cannot read properties of undefined (reading 'meta')
    at getPluginName (...)

This crash happens on every file when eslint-plugin-wdio is listed in jsPlugins, making the plugin completely unusable in oxlint.

Reproduction

// .oxlintrc.json
{
  "jsPlugins": ["eslint-plugin-wdio"],
  "rules": {
    "wdio/await-expect": "error"
  }
}

Running oxlint against any file produces:

TypeError: Cannot read properties of undefined (reading 'meta')

Expected behaviour

oxlint (and any other ESLint v9-compatible tooling) can load eslint-plugin-wdio without errors.

Suggested fix

Add a meta object to the plugin export in packages/eslint-plugin-wdio/src/index.ts:

import pkg from '../package.json'

export default {
  meta: {
    name: 'eslint-plugin-wdio',
    version: pkg.version,
  },
  configs,
  rules,
}

This is a non-breaking, additive change.

Environment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions