# eslint-plugin-cucumber

> eslint rules for cucumber steps

Latest version **2.0.0** (published 2022-03-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install eslint-plugin-cucumber
pnpm add eslint-plugin-cucumber
yarn add eslint-plugin-cucumber
bun add eslint-plugin-cucumber
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2022-03-25 |
| First published | 2015-10-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8.0.0 |
| Dependencies | 1 |
| Unpacked size | 36.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8 |
| Author | Darrin Holst |
| Maintainers | darrinholst |
| Keywords | eslint, eslintplugin, eslint-plugin, cucumber |

## Links

- npm: https://www.npmjs.com/package/eslint-plugin-cucumber
- Repository: https://github.com/darrinholst/eslint-plugin-cucumber
- Homepage: https://github.com/darrinholst/eslint-plugin-cucumber#readme
- Issues: https://github.com/darrinholst/eslint-plugin-cucumber/issues
- npm.io page: https://npm.io/package/eslint-plugin-cucumber

## Dependencies (1)

- [lodash](https://npm.io/package/lodash.md) ^4.17.15

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@pandacss/eslint-plugin](https://npm.io/package/@pandacss/eslint-plugin.md) — 18.7K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2022-03-25
- 1.4.0 — 2019-11-04
- 1.3.0 — 2019-10-12
- 1.2.0 — 2018-09-05
- 1.1.0 — 2018-01-28
- 1.0.0 — 2018-01-28
- 0.1.0 — 2015-12-29
- 0.0.1 — 2015-10-29

## README

# eslint-plugin-cucumber

[![NPM](https://nodei.co/npm/eslint-plugin-cucumber.png)](https://nodei.co/npm/eslint-plugin-cucumber/)

## Installation

You'll first need to install [ESLint](http://eslint.org):

```
$ 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:

```json
{
    "plugins": [
        "cucumber"
    ]
}
```


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

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

## Supported Rules

| Name               | Description                                                                                                         |
| -------------      | -------------                                                                                                       |
| [async-then](docs/rules/async-then.md)                 | If you assume asynchronous steps/hooks then your implementation should either be an async function, return a promise or provide a callback function|
| [expression-type](docs/rules/expression-type.md)       | Restrict steps to either Cucumber Expressions or Regular Expressions                                                |
| [no-restricted-tags](docs/rules/no-restricted-tags.md) | Restrict usage of specified tags                                                                                    |
| [no-arrow-functions](docs/rules/no-arrow-functions.md) | Restrict usage of arrow functions on step definitions                                                               |

## For Maintainers

#### Releasing

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

---
_Source: https://npm.io/package/eslint-plugin-cucumber · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
