{"id":19717,"library":"eslint-plugin-cucumber","title":"eslint-plugin-cucumber","description":"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.","status":"active","version":"2.0.0","language":"javascript","source_language":"en","source_url":"ssh://git@github.com/darrinholst/eslint-plugin-cucumber","tags":["javascript","eslint","eslintplugin","eslint-plugin","cucumber"],"install":[{"cmd":"npm install eslint-plugin-cucumber","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-cucumber","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-cucumber","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESLint plugin is loaded via plugins array, not via import/require in code.","wrong":"require('eslint-plugin-cucumber')","symbol":"cucumber","correct":"Add 'cucumber' to plugins in .eslintrc"},{"note":"Rule severity can be numeric (0,1,2) or string ('off','warn','error').","wrong":"\"cucumber/async-then\": \"error\"","symbol":"async-then","correct":"\"cucumber/async-then\": 2"},{"note":"Rule accepts options as an array after severity.","wrong":"\"cucumber/expression-type\": 2","symbol":"expression-type","correct":"\"cucumber/expression-type\": [2, \"CucumberExpression\"]"}],"quickstart":{"code":"// .eslintrc.json\n{\n    \"plugins\": [\"cucumber\"],\n    \"rules\": {\n        \"cucumber/async-then\": 2,\n        \"cucumber/expression-type\": [2, \"CucumberExpression\"],\n        \"cucumber/no-restricted-tags\": [2, \"wip\", \"broken\"],\n        \"cucumber/no-arrow-functions\": 2\n    }\n}","lang":"javascript","description":"Configures ESLint to lint Cucumber step definitions with four rules: async-then, expression-type, no-restricted-tags, and no-arrow-functions."},"warnings":[{"fix":"Update ESLint to version 7 or later.","message":"v2.0.0 updates no-arrow-functions rule for ESLint 7 compatibility, may break if using older ESLint version.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Install plugin globally if ESLint is global: npm install -g eslint-plugin-cucumber","message":"Plugin must be installed locally if ESLint is installed globally.","severity":"gotcha","affected_versions":"all"},{"fix":"Prefer regular functions for step definitions.","message":"Rule 'no-arrow-functions' restricts arrow functions on step definitions; may conflict with async/await usage.","severity":"gotcha","affected_versions":">=1.2.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run npm install eslint-plugin-cucumber --save-dev","cause":"Plugin not installed or not in node_modules.","error":"ESLint couldn't find the plugin \"eslint-plugin-cucumber\"."},{"fix":"Use numeric severity or string: \"cucumber/async-then\": 2 or \"cucumber/async-then\": \"error\"","cause":"Incorrect rule configuration format.","error":"Configuration for rule \"cucumber/async-then\" is invalid: Value \"2\" is not a valid severity."},{"fix":"Add an environment or use a global define for step keywords.","cause":"ESLint is parsing step definitions as regular code without Cucumber globals.","error":"Parsing error: The keyword 'Given' is not defined."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}