X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=.eslintrc.json;h=4630e071e53d38585b30bb149e8532483b262b0e;hb=0449506ab869866b2cecdaccd770c29f80c0d9d9;hp=844895d12c1eb0264af7e1fa4d0b17c1b8da44e9;hpb=216865344b108082f9500b5eb8cd5efeaa7df72f;p=lhc%2Fweb%2Fwiklou.git diff --git a/.eslintrc.json b/.eslintrc.json index 844895d12c..4630e071e5 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,16 +1,61 @@ { "extends": "wikimedia", "env": { - "browser": true, - "jquery": true + "browser": true }, "globals": { "require": false, "module": false, + "mw": false, + "$": false, "mediaWiki": false, + "jQuery": false, "OO": false }, "rules": { + "no-restricted-properties": [ + 2, + { + "object": "$", + "property": "map", + "message": "Please use Array.prototype.map instead" + }, + { + "object": "$", + "property": "inArray", + "message": "Please use Array.prototype.indexOf instead" + }, + { + "object": "$", + "property": "each", + "message": "Please consider different approaches to $.each, especially when using Array's. You can override this warning if necessary with eslint-disable-next-line." + }, + { + "object": "$", + "property": "isArray", + "message": "Please use Array.isArray instead" + }, + { + "object": "$", + "property": "isFunction", + "message": "Please use typeof (e.g. typeof e === 'function') instead" + }, + { + "object": "$", + "property": "grep", + "message": "Please use Array.prototype.filter instead" + }, + { + "object": "$", + "property": "trim", + "message": "Please use String.prototype.trim instead" + }, + { + "object": "$", + "property": "proxy", + "message": "Please use Function.prototype.bind instead" + } + ], "dot-notation": 0, "max-len": 0 }