mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-12 00:48:46 +00:00
72df451bd3
Help with readability by using module.exports and require rather than the MobileFrontend provided mw.mobileFrontend module manager (and avoid adopting webpack at this time) Replace usages of mw.mobileFrontend.require with local require and module.exports (compatible with RL or Node implementation) Changes: * Notifications modules are merged into skins.minerva.scripts and initialised via a client side check. * new file overlayManager for exporting an overlayManager singleton rather than being hidden inside resources/skins.minerva.scripts/init.js * All M.define/M.requires swapped out for require where possible The `define` method is now forbidden in the repo. Bug: T212944 Change-Id: I44790dd3fc6fe42bb502d79c39c4081c223bf2b1
54 lines
1.2 KiB
JSON
54 lines
1.2 KiB
JSON
{
|
|
"root": true,
|
|
"extends": [
|
|
"wikimedia/client",
|
|
"wikimedia/jquery"
|
|
],
|
|
"env": {
|
|
"commonjs": true
|
|
},
|
|
"globals": {
|
|
"OO": "readonly",
|
|
"mw": "readonly",
|
|
"require": "readonly"
|
|
},
|
|
"rules": {
|
|
"no-restricted-properties": [
|
|
"error",
|
|
{
|
|
"property": "define",
|
|
"message": "The method `define` if used with mw.mobileFrontend is deprecated. Please use `module.exports`."
|
|
},
|
|
{
|
|
"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"
|
|
}
|
|
}
|
|
],
|
|
"object-property-newline": "error",
|
|
"no-use-before-define": "off",
|
|
"no-underscore-dangle": "off"
|
|
}
|
|
}
|