Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 419 Bytes

no-single-chain.md

File metadata and controls

21 lines (14 loc) · 419 Bytes

No Single Chain

This rule prevents unnecessary use of the lodash wrapper, when the chaining is only one method long.

Rule Details

This rule takes no arguments.

The following patterns are considered warnings:

var x = _(arr).map(f).value();
var x = _(arr).reduce(f, i);

The following patterns are not considered warnings:

var x = _.map(arr, f);
var x = _(arr).map(f).reduce(g, i).value();