You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"The quantified expression {{expr}} at the {{endOrStart}} of the expression tree should only be matched a constant number of times. The expression can be removed without affecting the lookaround.",
67
+
"The quantified expression '{{expr}}' at the {{endOrStart}} of the expression tree should only be matched a constant number of times. The expression can be removed without affecting the lookaround.",
58
68
replacedWith:
59
-
"The quantified expression {{expr}} at the {{endOrStart}} of the expression tree should only be matched a constant number of times. The expression can be replaced with {{replacer}} without affecting the lookaround.",
69
+
"The quantified expression '{{expr}}' at the {{endOrStart}} of the expression tree should only be matched a constant number of times. The expression can be replaced with {{replacer}} without affecting the lookaround.",
"The quantified expression a* at the end of the expression tree should only be matched a constant number of times. The expression can be removed without affecting the lookaround.",
19
+
"The quantified expression 'a*' at the end of the expression tree should only be matched a constant number of times. The expression can be removed without affecting the lookaround.",
20
20
line: 1,
21
21
column: 6,
22
22
},
@@ -27,7 +27,7 @@ tester.run("optimal-lookaround-quantifier", rule as any, {
27
27
errors: [
28
28
{
29
29
message:
30
-
"The quantified expression c* at the end of the expression tree should only be matched a constant number of times. The expression can be removed without affecting the lookaround.",
30
+
"The quantified expression 'c*' at the end of the expression tree should only be matched a constant number of times. The expression can be removed without affecting the lookaround.",
31
31
line: 1,
32
32
column: 14,
33
33
},
@@ -38,7 +38,7 @@ tester.run("optimal-lookaround-quantifier", rule as any, {
38
38
errors: [
39
39
{
40
40
message:
41
-
"The quantified expression c+ at the end of the expression tree should only be matched a constant number of times. The expression can be replaced with c (no quantifier) without affecting the lookaround.",
41
+
"The quantified expression 'c+' at the end of the expression tree should only be matched a constant number of times. The expression can be replaced with 'c' (no quantifier) without affecting the lookaround.",
42
42
line: 1,
43
43
column: 14,
44
44
},
@@ -49,7 +49,7 @@ tester.run("optimal-lookaround-quantifier", rule as any, {
49
49
errors: [
50
50
{
51
51
message:
52
-
"The quantified expression c{4,9} at the end of the expression tree should only be matched a constant number of times. The expression can be replaced with c{4} without affecting the lookaround.",
52
+
"The quantified expression 'c{4,9}' at the end of the expression tree should only be matched a constant number of times. The expression can be replaced with 'c{4}' without affecting the lookaround.",
53
53
line: 1,
54
54
column: 14,
55
55
},
@@ -60,18 +60,18 @@ tester.run("optimal-lookaround-quantifier", rule as any, {
60
60
errors: [
61
61
{
62
62
message:
63
-
"The quantified expression [a-c]* at the start of the expression tree should only be matched a constant number of times. The expression can be removed without affecting the lookaround.",
63
+
"The quantified expression '[a-c]*' at the start of the expression tree should only be matched a constant number of times. The expression can be removed without affecting the lookaround.",
64
64
line: 1,
65
65
column: 6,
66
66
},
67
67
],
68
68
},
69
69
{
70
-
code: `/(?<=(c)*ab)/`,
70
+
code: `/(?<=(?:d|c)*ab)/`,
71
71
errors: [
72
72
{
73
73
message:
74
-
"The quantified expression (c)* at the start of the expression tree should only be matched a constant number of times. The expression can be removed without affecting the lookaround.",
74
+
"The quantified expression '(?:d|c)*' at the start of the expression tree should only be matched a constant number of times. The expression can be removed without affecting the lookaround.",
0 commit comments