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.

if ("CallExpression" in node) {
}

This rule is not configurable.

Made with ❤️‍🔥 in Boston by Josh Goldberg and contributors.