Skip to content

Latest commit

 

History

History
25 lines (15 loc) · 587 Bytes

preferred-alias.md

File metadata and controls

25 lines (15 loc) · 587 Bytes

Preferred Alias

Some Lodash methods have one or more aliases, which can lead to inconsistent code and decrease readability.

Rule Details

This rule takes one argument - an optional options object. This object can have one key:

  • ignoreMethods: contains an array of method names that should not be reported on.

The following patterns are considered warnings:

_.each(users, f);

The following patterns are not considered warnings:

_.forEach(users, f);

When Not To Use It

If you do not want to enforce preferred alias, then you can disable this rule.