Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 613 Bytes

no-done-fail.md

File metadata and controls

27 lines (19 loc) · 613 Bytes

no-done-fail

Disallows the .done/.fail methods. Prefer .then.

📋 This rule is enabled in plugin:no-jquery/all.

Rule details

❌ Examples of incorrect code:

promise.done( callback );
promise.fail( callback );

✔️ Examples of correct code:

promise.then( doneCallback, failCallback );
done();
fail();

Resources