# eslint-plugin-lookbehind-assertions

> ESLint plugin for regular expression lookbehind assertions

Latest version **1.0.3** (published 2021-09-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install eslint-plugin-lookbehind-assertions
pnpm add eslint-plugin-lookbehind-assertions
yarn add eslint-plugin-lookbehind-assertions
bun add eslint-plugin-lookbehind-assertions
```

## 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 | 1.0.3 |
| Published | 2021-09-11 |
| First published | 2021-06-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 11.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Takuya Nakayasu |
| Maintainers | takuya.nakayasu |
| Keywords | eslint, eslintplugin, eslint-plugin |

## Links

- npm: https://www.npmjs.com/package/eslint-plugin-lookbehind-assertions
- Repository: https://github.com/takuya-nakayasu/eslint-plugin-lookbehind-assertions
- Issues: https://github.com/takuya-nakayasu/eslint-plugin-lookbehind-assertions/issues
- npm.io page: https://npm.io/package/eslint-plugin-lookbehind-assertions

## 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

- 1.0.3 (latest) — 2021-09-11
- 1.0.2 — 2021-06-26
- 1.0.1 — 2021-06-19
- 1.0.0 — 2021-06-13
- 0.0.1 — 2021-06-13

## README

# eslint-plugin-lookbehind-assertions

An ESLint plugin that disallows the use of regular expression lookbehind assertions.

[![npm version](https://img.shields.io/npm/v/eslint-plugin-lookbehind-assertions.svg)](https://www.npmjs.com/package/eslint-plugin-lookbehind-assertions)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Twitter](https://img.shields.io/twitter/follow/takuya_nakayasu?style=social)](https://twitter.com/takuya_nakayasu)

## Installation

```
npm install --save-dev eslint-plugin-lookbehind-assertions
```

Or

```
yarn add --dev eslint-plugin-lookbehind-assertions
```

## Usage

Modify your `.eslintrc`

```js
// .eslintrc.json
module.exports = {
  "plugins": [
    ...,
    "lookbehind-assertions"
  ],
  "rules": [
    ...,
    "lookbehind-assertions/no-lookbehind-assertions-regexp": "error"
  ]
  ...,
}
```

## Rules

| Rule ID                                                                            | Description                                                   |
| ---------------------------------------------------------------------------------- | ------------------------------------------------------------- |
| [no-lookbehind-assertions-regexp](./docs/rules/no-lookbehind-assertions-regexp.md) | Disallows the use of regular expression lookbehind assertions |

## Examples

Examples of **incorrect** code:

```ts
let re = /(?<=ripe )orange/;
re = new RegExp('(?<=ripe )orange');
```

Examples of **correct** code:

```ts
let re = /\d+(?=%)/;
re = new RegExp('d+(?=%)');
```

## License

MIT

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