Various jQuery methods have native equivalents and are supported by all grade A browsers in MediaWiki, yet in core we continue to use jQuery methods
We should modernize this code and enforce usage of native JavaScript via eslint going forward.
Acceptance criteria
For purpose of Google-Code-In this can be separated into tasks if necessary.
- eslint is set up to warn against violations (https://gerrit.wikimedia.org/r/449670)
- All $.isArray -> Array.isArray
- All $.map -> Array.prototype.map
- All $.each -> Array.prototype.forEach https://gerrit.wikimedia.org/r/451888
- All $.grep -> Array.prototype.filter
- All $.inArray -> Array.prototype.indexOf
- All $.trim -> String.prototype.trim
- All $.proxy -> Function.prototype.bind (https://gerrit.wikimedia.org/r/457856)
- eslint is updated to error rather than warn
- The wikimedia eslint config is updated (https://github.com/wikimedia/eslint-config-wikimedia) so that other extensions and skins are made to adhere to this rule (this will be done as part of https://github.com/wikimedia/eslint-config-wikimedia/issues/106)
- eslint ignores are removed and violators are fixed! https://github.com/wikimedia/eslint-config-wikimedia/issues/106