mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-24 22:25:27 +00:00
Merge "Forbid certain methods with ES6 equivalents"
This commit is contained in:
commit
e679f5207a
|
@ -12,6 +12,36 @@
|
|||
},
|
||||
"rules": {
|
||||
"no-restricted-properties": [2,
|
||||
{
|
||||
"object": "$",
|
||||
"property": "noop",
|
||||
"message": "Use function() {}"
|
||||
},
|
||||
{
|
||||
"object": "$",
|
||||
"property": "isFunction",
|
||||
"message": "Please use typeof"
|
||||
},
|
||||
{
|
||||
"object": "$",
|
||||
"property": "map",
|
||||
"message": "Please use Array.prototype.map instead"
|
||||
},
|
||||
{
|
||||
"object": "$",
|
||||
"property": "isArray",
|
||||
"message": "Please use Array.isArray instead"
|
||||
},
|
||||
{
|
||||
"object": "$",
|
||||
"property": "grep",
|
||||
"message": "Please use Array.prototype.filter instead"
|
||||
},
|
||||
{
|
||||
"object": "$",
|
||||
"property": "trim",
|
||||
"message": "Please use String.prototype.trim instead"
|
||||
},
|
||||
{
|
||||
"property": "done",
|
||||
"message": "The method `done` if used with Deferred objects is incompatible with ES6 Promises. Please use `then`."
|
||||
|
|
Loading…
Reference in a new issue