Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 1000 Bytes

no-deferred-pipe.md

File metadata and controls

28 lines (19 loc) · 1000 Bytes

deferred.pipe() is deprecated

The .pipe() method on a jQuery.Deferred object was deprecated as of jQuery 1.8, when the .then() method was changed to perform the same function.

In most cases it is sufficient to change all occurrences of .pipe() to .then(). Ensure that you aren't relying on context/state propagation (e.g., using this) or synchronous callback invocation, which were dropped from .then() for Promises/A+ interoperability as of jQuery 3.0.

Rule Details

Examples of incorrect code for this rule:

$.Deferred().pipe(fn)

Examples of correct code for this rule:

$.Deferred().then(fn)

Further Reading