Registry / testing / eslint-plugin-cucumber

eslint-plugin-cucumber

JSON →
library2.0.0jsnpmunverified

ESLint plugin providing rules for Cucumber step definitions and hooks. The latest stable version is 2.0.0, which updates no-arrow-functions for ESLint 7 compatibility. Released as a major version bump for safety, though the change is backward compatible. Earlier versions (1.x) added features like async-then, expression-type, no-restricted-tags, and no-arrow-functions rules. It supports Cucumber v2+ syntax and is designed to enforce best practices in Cucumber test files. Minimal dependencies, lightweight, and focused on linting step definitions.

testing
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.

ESLint plugin is loaded via plugins array, not via import/require in code.

Add 'cucumber' to plugins in .eslintrc

Rule severity can be numeric (0,1,2) or string ('off','warn','error').

"cucumber/async-then": 2

Rule accepts options as an array after severity.

"cucumber/expression-type": [2, "CucumberExpression"]

Configures ESLint to lint Cucumber step definitions with four rules: async-then, expression-type, no-restricted-tags, and no-arrow-functions.

// .eslintrc.json { "plugins": ["cucumber"], "rules": { "cucumber/async-then": 2, "cucumber/expression-type": [2, "CucumberExpression"], "cucumber/no-restricted-tags": [2, "wip", "broken"], "cucumber/no-arrow-functions": 2 } }
Debug
Known footguns
breakingv2.0.0 updates no-arrow-functions rule for ESLint 7 compatibility, may break if using older ESLint version.
gotchaPlugin must be installed locally if ESLint is installed globally.
gotchaRule 'no-arrow-functions' restricts arrow functions on step definitions; may conflict with async/await usage.
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
9 hits · last 30 days
gptbot
4
ahrefsbot
4
script
1
Resources