nzakas/eslint — pull request #471 by iancmyers (2013-12-23 08:04:33+00:00)
Title: Rule: max-nested-callbacks

Created the `max-nested-callbacks` rule. This rule allows you to configure the maximum depth that callbacks may be nested inside of each other. This rule is aimed at discouraging the so-called "callback hell" that is a common pitfall of asynchronous programming with callbacks.

The `max-nested-callbacks` rule differs from `max-depth` in that it only takes callbacks into consideration when determining depth, as opposed to all block statements. This level of granularity is useful because the theshold beyond which code becomes less clear is much lower for nested callbacks than for block statements in general.

```js
foo(function () {
bar(function () {
baz(function() {
qux(function () {

});
});
});
});
```