2.0.0 • Published 2 years ago

eslint-plugin-cucumber v2.0.0

Weekly downloads
22,103
License
MIT
Repository
github
Last release
2 years ago

eslint-plugin-cucumber

NPM

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-cucumber:

$ npm install eslint-plugin-cucumber --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-cucumber globally.

Usage

Add cucumber to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "cucumber"
    ]
}

Then configure the rules you want to use under the rules section.

{
    "rules": {
        "cucumber/async-then": 2,
        "cucumber/expression-type": 2,
        "cucumber/no-restricted-tags": [2, "wip", "broken", "foo"],
        "cucumber/no-arrow-functions": 2
    }
}

Supported Rules

NameDescription
async-thenIf you assume asynchronous steps/hooks then your implementation should either be an async function, return a promise or provide a callback function
expression-typeRestrict steps to either Cucumber Expressions or Regular Expressions
no-restricted-tagsRestrict usage of specified tags
no-arrow-functionsRestrict usage of arrow functions on step definitions

For Maintainers

Releasing

  1. bump version
  2. npm publish
  3. tag release (git tag vx.x.x && git push origin master --tags)
  4. build github release (npx release)