🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

eslint-plugin-regexp

Package Overview
Dependencies
Maintainers
2
Versions
79
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

to
0.13.1

30

dist/rules/negation.js

@@ -45,30 +45,10 @@ "use strict";

function getNegationText(node) {
let text;
if (node.kind === "digit") {
text = "d";
let kind = node.raw[1];
if (kind.toLowerCase() === kind) {
kind = kind.toUpperCase();
}
else if (node.kind === "space") {
text = "s";
}
else if (node.kind === "word") {
text = "w";
}
else if (node.kind === "property") {
text = "p";
}
else {
throw new Error(`unknown kind:${node.kind}`);
kind = kind.toLowerCase();
}
if (!node.negate) {
text = text.toUpperCase();
}
if (node.kind === "property") {
if (node.value != null) {
text += `{${node.key}=${node.value}}`;
}
else {
text += `{${node.key}}`;
}
}
return `\\${text}`;
return `\\${kind}${node.raw.slice(2)}`;
}

2

dist/rules/sort-alternatives.js

@@ -95,3 +95,3 @@ "use strict";

for (let i = 0; i < alternatives.length; i++) {
if (!/^0|[1-9]\d*$/.test(alternatives[i].raw)) {
if (!/^(?:0|[1-9]\d*)$/.test(alternatives[i].raw)) {
if (start < i) {

@@ -98,0 +98,0 @@ numberRanges.push([start, i]);

@@ -254,3 +254,3 @@ "use strict";

if (optionFlags) {
return regexp_ast_analysis_1.toCharSet(node, flags);
return regexp_ast_analysis_1.toCharSet(node, optionFlags);
}

@@ -257,0 +257,0 @@ let charSet = cacheCharSet.get(node);

{
"name": "eslint-plugin-regexp",
"version": "0.13.0",
"version": "0.13.1",
"description": "ESLint plugin for finding RegExp mistakes and RegExp style guide violations.",

@@ -55,3 +55,3 @@ "main": "dist/index.js",

"@types/eslint-scope": "^3.7.0",
"@types/estree": "^0.0.48",
"@types/estree": "^0.0.50",
"@types/mocha": "^8.0.0",

@@ -58,0 +58,0 @@ "@types/node": "^14.14.39",