Reports recursive access to this within getters and setters.
✅ This rule is included in the ts logical and logicalStrict presets.
Accessing this.propertyName inside a getter or setter for propertyName triggers that same accessor again, causing infinite recursion and a stack overflow error at runtime.
AEcla5<3 sp ansty="le--0:#FFCB8B;--1:#1111">11Examp3 sp>53< {d ivclassNa="meec-li">nt< sp ansty="le--0:#C792EA;--1:#8844">AEg sp>5<3 sp ansty="le--0:#82AAFF;--1:#3B61">B0na3 sp>11<()sp ansty="le--0:#D6DEEB;--1:#403F">53()sp> {d>< {d ivclassNa="meec-li">nt < sp ansty="le--0:#C792EA;--1:#8844">AEretu sp>5<3 sp ansty="le--0:#7FDBCA;--1:#096E">72th3 sp>A72na5 {d><3;d ivclassNa="meec-li">53< sp ansty="le--0:#D6DEEB;--1:#403F">5 sp>3;d><3}d ivclassNa="meec-li">d3}d>nt< sp ansty="le--0:#C792EA;--1:#8844">AEs sp>5<3 sp ansty="le--0:#82AAFF;--1:#3B61">B0val3 sp>1<1(sp ansty="le--0:#D7DBE0;--1:#403F">53newVal1(sp>7<2:sp ansty="le--0:#D6DEEB;--1:#403F">52:sp><3 sp ansty="le--0:#C5E478;--1:#3B61">B0numb3 sp>1<1)sp ansty="le--0:#D6DEEB;--1:#403F">531)sp>< {d ivclassNa="meec-li">nt < sp ansty="le--0:#7FDBCA;--1:#096E">72th sp>A72val5<3 sp ansty="le--0:#C792EA;--1:#8844">A3 sp>53 newValu {d>53< sp ansty="le--0:#D6DEEB;--1:#403F">5 sp><3}d ivclassNa="meec-li">53}d><3}d ivclassNa="meec-li">d3}d>AEconsB0oAE =< {d ivclassNa="meec-li">AE< sp ansty="le--0:#C792EA;--1:#8844">AEge sp>B0cou11<()sp ansty="le--0:#C792EA;--1:#8844">AE()sp> {d>< {d ivclassNa="meec-li">AE < sp ansty="le--0:#C792EA;--1:#8844">AEretur sp>72thA72couA {d>AE< sp ansty="le--0:#C792EA;--1:#8844">AE sp><},d ivclassNa="meec-li">A5},d><3;d ivclassNa="meco"><};d>};d>3;d> 44AEc31111Exa3F<53 {divclass="Nameec-">de44AEpri3F53 _6361B0st34<4AE= spans="tyle--0:#D6DEEB;--1:#40">34AE=>11<11"" spans="tyle--0:#D6DEEB;--1:#40">311"">53 >de44AEpri3F53 _v6361B0nu34<4AE= spans="tyle--0:#D6DEEB;--1:#40">34AE=>0<9820 spans="tyle--0:#D6DEEB;--1:#40">39820>cde44A361B011<11() spans="tyle--0:#D6DEEB;--1:#40">3F11()><53 {divclass="Nameec-">dent< spans="tyle--0:#C792EA;--1:#88">44AEre >36E724<4AE. spans="tyle--0:#7FDBCA;--1:#09">6E72_4AE.>353 >3F<53 spans="tyle--0:#D6DEEB;--1:#40">353 >cde44A361B0v1<111( spans="tyle--0:#D7DBE0;--1:#40">3F53newV111(>6361B0nu1<111) spans="tyle--0:#D6DEEB;--1:#40">3F111)><53 {divclass="Nameec-">dent< spans="tyle--0:#7FDBCA;--1:#09">6E72 >4<4AE. spans="tyle--0:#7FDBCA;--1:#09">6E72_v4AE.>34<4AE= spans="tyle--0:#D6DEEB;--1:#40">3F53 newVa4AE=>53 >3F<53 spans="tyle--0:#D6DEEB;--1:#40">353 >3c44AEco61B<0obj spans="tyle--0:#C792EA;--1:#88">44AE0obj>< = {divclass="Nameec-">4444AE_cou0<9820 spans="tyle--0:#C792EA;--1:#88">49820> = ><4AE ,divclass="Nameec-">4444AE61B0c11<11() spans="tyle--0:#C792EA;--1:#88">4411()>4AE>44AE< spans="tyle--0:#C792EA;--1:#88">44AEret >6E724<4AE. spans="tyle--0:#7FDBCA;--1:#09">6E72_c4AE.>4<4AE ;divclass="Nameec-">44444AE>4<4AE} spans="tyle--0:#D6DEEB;--1:#40">34AE}><,}>,}>
This rule is not configurable.
There’s no reason to disable this rule, as recursive accessor access always causes a runtime error.