Skip to content

Files

Latest commit

 

History

History
18 lines (11 loc) · 648 Bytes

underscore-consistent-invocation.md

File metadata and controls

18 lines (11 loc) · 648 Bytes

Pattern: Inconsistent use of _ function

Issue: -

Description

Enforce a consistent usage of _ functions. By default, invoking underscore functions should begin with wrapping a variable in an underscore instance: _(list).map(...). An alternative is to prefer using the static methods on the _ variable: _.map(list, ...).

Configuration

The rule accepts a single parameter called style which can be the value 'static' or 'instance': [true, { "style": "static" }].

Further Reading