Skip to content

nodePropertyInChecks

Disallows using the in operator to check properties on TypeScript nodes.

✅ This rule is included in the flint logical presets.

Using the in operator to check for the existence of properties on TypeScript AST nodes can lead to unreliable results, as not all properties may be present on every node type.

AE53< (sp ansty="le--0:#D9F5DD;--1:#1111">1<1"sp ansty="le--0:#ECC48D;--1:#984E">4DCallExpressi1<1"sp ansty="le--0:#D6DEEB;--1:#403F">5<3 sp ansty="le--0:#7FDBCA;--1:#096E">7253 node)< {d ivclassNa="meec-li">5<3}d ivclassNa="meco"><}d>
443F53 (4<4AE. spans="tyle--0:#7FDBCA;--1:#09">6E72344A3F53 Syntax4<4AE. spans="tyle--0:#7FDBCA;--1:#09">6E72CallExpres3F5<3) {divclass="Nameec-">3< {>

This rule is not configurable.