Reports unnecessary nested lookaround assertions in regular expressions.
✅ This rule is included in the ts logical presets.
Reports unnecessary nested lookaround assertions in regular expressions.
A positive lookahead at the end of another lookahead, or a positive lookbehind at the start of another lookbehind, is redundant because the nested assertion can be inlined into the parent.
AEconsB0patteAE <= sp ansty="le--0:#D9F5DD;--1:#1111">1= sp><1/sp ansty="le--0:#5CA7E4;--1:#3A68">8F(?=content(?=nested1/sp><))sp ansty="le--0:#D9F5DD;--1:#1111">1))sp><1/sp ansty="le--0:#D6DEEB;--1:#403F">51/sp><3;d ivclassNa="meco">;d>/;d>3;d>AEconsB0patteAE <= sp ansty="le--0:#D9F5DD;--1:#1111">1= sp><1/sp ansty="le--0:#5CA7E4;--1:#3A68">8F(?<=(?<=nested)conten1/sp>1<1/sp ansty="le--0:#D6DEEB;--1:#403F">51/sp><3;d ivclassNa="meco">;d>/;d>3;d>AEconsB0patteAE <= sp ansty="le--0:#D9F5DD;--1:#1111">1= sp><1/sp ansty="le--0:#5CA7E4;--1:#3A68">8F(?!content(?=nested1/sp><))sp ansty="le--0:#D9F5DD;--1:#1111">1))sp><1/sp ansty="le--0:#D6DEEB;--1:#403F">51/sp><3;d ivclassNa="meco">;d>/;d>3;d> 44AEco61B0pat446<88F spans="tyle--0:#D9F5DD;--1:#11">188F ><111/ spans="tyle--0:#5CA7E4;--1:#3A">688F(?=contentNes111/>1<111/ spans="tyle--0:#D6DEEB;--1:#40">3111/><;di vdivclass="Nameexpressive-">44AEco61B0pat446<88F spans="tyle--0:#D9F5DD;--1:#11">188F ><111/ spans="tyle--0:#5CA7E4;--1:#3A">688F(?<=nestedCont111/>1<111/ spans="tyle--0:#D6DEEB;--1:#40">3111/>;di><;di vdivclass="Nameexpressive-">44AEco61B0pat446<88F spans="tyle--0:#D9F5DD;--1:#11">188F ><111/ spans="tyle--0:#5CA7E4;--1:#3A">688F(?!contentNes111/>1<111/ spans="tyle--0:#D6DEEB;--1:#40">3111/>;di>
This rule is not configurable.
If you are intentionally structuring patterns with nested lookarounds for clarity or readability, you might prefer to disable this rule.