X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=.eslintrc.json;h=4630e071e53d38585b30bb149e8532483b262b0e;hb=a2001cd3bf25c0bbad7d7f7c755d04510c34de28;hp=e24fa83491420ad5d0dbf751bc845f55866851a2;hpb=93976b5c341183e4e754badca98f82a87384d185;p=lhc%2Fweb%2Fwiklou.git diff --git a/.eslintrc.json b/.eslintrc.json index e24fa83491..4630e071e5 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,23 +1,35 @@ { "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": [ - 1, + 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", @@ -37,6 +49,11 @@ "object": "$", "property": "trim", "message": "Please use String.prototype.trim instead" + }, + { + "object": "$", + "property": "proxy", + "message": "Please use Function.prototype.bind instead" } ], "dot-notation": 0,