mediawiki-skins-MinervaNeue/.eslintrc.json
Stephen Niedzielski 27ea969762 Hygiene: limit ESLint inheritance
The project ESLint configuration unintentionally inherited unwanted
configuration from MediaWiki, which allows global jQuery usage. Cap the
project's ESLint hierarchy at the project root.

Change-Id: Iceda39a4eeb492446b952f597af0f153cf345206
2018-10-05 10:22:11 -06:00

77 lines
1.7 KiB
JSON

{
"root": true,
"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
}
}