# max-nested-calls πŸ“ Limit the depth of nested calls. πŸ’ΌπŸš« This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the β˜‘οΈ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). Deeply nested calls make code hard to read. Extract intermediate results to named variables instead. This rule counts calls and constructor calls passed into other calls or constructors. Fluent receiver chains and JSX wrappers are ignored. ## Examples ```js // ❌ foo(bar(baz(qux()))); // βœ… const value = baz(qux()); foo(bar(value)); ``` ```js // βœ… query().filter().map().toArray(); ``` ## Options ### max Type: `integer`\ Default: `3` The maximum allowed nested call depth. ```js /* eslint unicorn/max-nested-calls: ["error", {"max": 4}] */ // βœ… foo(bar(baz(qux()))); ```