HF RL Explorer

Feature Request: New ESLint rule prefer-catch

Feature Request: New ESLint rule prefer-catch: a task in LegoFlow-SWE (Harbor dataset). When developers write promise.then(onFulfilled, onRejected) or promise.then(null, onRejected) , it’s less obvious that errors are being handled compared to using a separate catch . Moreover, promise.then(f, g)…

The task

When developers write `promise.then(onFulfilled, onRejected)` or `promise.then(null, onRejected)`, it’s less obvious that errors are being handled compared to using a separate `catch`. Moreover, `promise.then(f, g)` is not equivalent to `promise.then(f).catch(g)` — errors thrown inside the fulfillment handler are not…

Part of Lego-X/LegoFlow-SWE.