Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-regexp

Package Overview
Dependencies
Maintainers
2
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-regexp - npm Package Compare versions

Comparing version 2.1.2 to 2.2.0

11

dist/rules/no-unused-capturing-group.js

@@ -24,2 +24,3 @@ "use strict";

fixable: { type: "boolean" },
allowNamed: { type: "boolean" },
},

@@ -37,6 +38,14 @@ additionalProperties: false,

create(context) {
var _a, _b;
var _a, _b, _c, _d;
const fixable = (_b = (_a = context.options[0]) === null || _a === void 0 ? void 0 : _a.fixable) !== null && _b !== void 0 ? _b : false;
const allowNamed = (_d = (_c = context.options[0]) === null || _c === void 0 ? void 0 : _c.allowNamed) !== null && _d !== void 0 ? _d : false;
function reportUnused(unused, regexpContext) {
const { node, getRegexpLocation, fixReplaceNode, getAllCapturingGroups, } = regexpContext;
if (allowNamed) {
for (const cgNode of unused) {
if (cgNode.name) {
unused.delete(cgNode);
}
}
}
const fixableGroups = new Set();

@@ -43,0 +52,0 @@ for (const group of [...getAllCapturingGroups()].reverse()) {

6

package.json
{
"name": "eslint-plugin-regexp",
"version": "2.1.2",
"version": "2.2.0",
"description": "ESLint plugin for finding RegExp mistakes and RegExp style guide violations.",

@@ -91,3 +91,3 @@ "engines": {

"intl-segmenter-polyfill": "^0.4.4",
"markdownlint-cli": "^0.37.0",
"markdownlint-cli": "^0.38.0",
"mocha": "^10.0.0",

@@ -99,3 +99,3 @@ "mocha-chai-jest-snapshot": "^1.1.3",

"prettier": "~3.1.0",
"stylelint": "^15.0.0",
"stylelint": "^16.0.0",
"stylelint-config-standard-vue": "^1.0.0",

@@ -102,0 +102,0 @@ "ts-node": "^10.2.1",

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