New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-lookbehind-assertions

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-lookbehind-assertions

ESLint plugin for regular expression lookbehind assertions

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

eslint-plugin-lookbehind-assertions

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

npm version License: MIT Twitter

Installation

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

Or

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

Usage

Modify your .eslintrc

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

Rules

Rule IDDescription
no-lookbehind-assertions-regexpDisallows the use of regular expression lookbehind assertions

Examples

Examples of incorrect code:

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

Examples of correct code:

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

License

MIT

Keywords

FAQs

Package last updated on 11 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc