nodePropertyInChecks
Disallows using the
inoperator 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.
Examples
Section titled “Examples”if ("CallExpression" in node) {}if (ts.isCallExpression(node)) {}Options
Section titled “Options”This rule is not configurable.
Equivalents in Other Linters
Section titled “Equivalents in Other Linters”
Made with ❤️🔥 in Boston by
Josh Goldberg and contributors.