Forbid use of done/always/fail

Bug: T188937
Change-Id: I3279963d9f97a03b49c88f7c549330e3202d727f
This commit is contained in:
jdlrobson 2018-08-21 17:16:09 -07:00 committed by Jdlrobson
parent cd6ef504cf
commit af89d945a6
1 changed files with 14 additions and 0 deletions

View File

@ -12,6 +12,20 @@
"require": false
},
"rules": {
"no-restricted-properties": [2,
{
"property": "done",
"message": "The method `done` if used with Deferred objects is incompatible with ES6 Promises. Please use `then`."
},
{
"property": "fail",
"message": "The method `fail` if used with Deferred objects is incompatible with ES6 Promises. Please use `then`."
},
{
"property": "always",
"message": "The method `always` if used with Deferred objects is incompatible with ES6 Promises. Please use `then`."
}
],
"valid-jsdoc": ["error", {
"requireParamDescription": false,
"requireReturnDescription": false,