Reports assertions inside optional quantifiers that have no effect.
✅ This rule is included in the ts logical presets.
Assertions (like \b, ^, $, (?=...), (?<=...)) that are inside optional quantifiers (?, *, {0,n}) where all paths to the assertion consume no characters.
These assertions are useless because the regex engine can skip the entire quantified element without any impact.
This rule reports on any assertion that are unnecessary for being inside optional quantifiers.
If you are constructing patterns dynamically or using patterns as partials that will be combined with other patterns, you might need to disable this rule.
You might consider using Flint disable comments and/or configuration file disables for those specific situations instead of completely disabling this rule.