eslint-plugin-regexp
Advanced tools
@@ -258,3 +258,14 @@ "use strict"; | ||
| fixable: "code", | ||
| schema: [], | ||
| schema: [ | ||
| { | ||
| type: "object", | ||
| properties: { | ||
| minAlternatives: { | ||
| type: "integer", | ||
| minimum: 2, | ||
| }, | ||
| }, | ||
| additionalProperties: false, | ||
| }, | ||
| ], | ||
| messages: { | ||
@@ -266,2 +277,4 @@ unexpected: "Unexpected the disjunction of single element alternatives. Use character class '[...]' instead.", | ||
| create(context) { | ||
| var _a, _b; | ||
| const minCharacterAlternatives = (_b = (_a = context.options[0]) === null || _a === void 0 ? void 0 : _a.minAlternatives) !== null && _b !== void 0 ? _b : 3; | ||
| function createVisitor(regexpContext) { | ||
@@ -302,3 +315,3 @@ const { node, flags, getRegexpLocation, fixReplaceNode } = regexpContext; | ||
| const parsedAlts = parseRawAlts(alts, flags); | ||
| if (characterAltsCount >= 3 || | ||
| if (characterAltsCount >= minCharacterAlternatives || | ||
| containsCharacterClass(alts) || | ||
@@ -305,0 +318,0 @@ totalIsAll(alts, regexpContext) || |
+4
-4
| { | ||
| "name": "eslint-plugin-regexp", | ||
| "version": "1.8.0", | ||
| "version": "1.9.0", | ||
| "description": "ESLint plugin for finding RegExp mistakes and RegExp style guide violations.", | ||
@@ -74,3 +74,3 @@ "engines": { | ||
| "eslint-plugin-prettier": "^4.0.0", | ||
| "eslint-plugin-regexp": "~1.7.0", | ||
| "eslint-plugin-regexp": "~1.8.0", | ||
| "eslint-plugin-vue": "^9.0.0", | ||
@@ -84,4 +84,4 @@ "eslint-plugin-yml": "^1.0.0", | ||
| "stylelint": "^14.9.1", | ||
| "stylelint-config-standard": "^26.0.0", | ||
| "stylelint-stylus": "^0.16.1", | ||
| "stylelint-config-standard": "^28.0.0", | ||
| "stylelint-stylus": "^0.17.0", | ||
| "ts-node": "^10.2.1", | ||
@@ -88,0 +88,0 @@ "typescript": "~4.7.0", |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
626546
0.08%15521
0.08%