A

TypeScript/v5.6/arrow-function-condition-to-binary-expression

How to Use
Run this codemod on your codebase using one of the following commands

The easiest way to run this codemod without installing anything globally:

Documentation

Identify cases where an arrow function is mistakenly used instead of a comparison operator (e.g., x => 0 instead of x >= 0) and convert the arrow function expressions to proper comparison operations.

Before

ts

After

ts

Ready to contribute?

Build your own codemod and share it with the community.