eslint-plugin-regexp
Advanced tools
Comparing version 2.1.2 to 2.2.0
@@ -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()) { |
{ | ||
"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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
747989
18128