mediawiki-skins-MinervaNeue/.eslintrc.json
jdlrobson 9312f3d1b2 Forbid certain methods with ES6 equivalents
We do this in core and in MobileFrontend. Let's ban some here
too.

Change-Id: I4cc24381ab0b637eb386c93bd0d88fe803db0483
2018-10-01 15:33:46 -07:00

76 lines
1.7 KiB
JSON

{
"extends": "wikimedia",
"env": {
"browser": true,
"jquery": true
},
"globals": {
"OO": false,
"mw": false,
"Hogan": false,
"require": false
},
"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`."
},
{
"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,
"requireReturn": false,
"preferType": {
"Boolean": "boolean",
"Number": "number",
"object": "Object",
"String": "string"
}
}],
"dot-notation": [ "error", { "allowKeywords": true } ],
"object-property-newline": "error",
"computed-property-spacing": 0,
"no-use-before-define": 0,
"no-underscore-dangle": 0
}
}