Use .forEach or better yet, inspect the usage of $.each and change it to .map if it is producing a new array, or .reduce if it is collecting a new result based on the array.
We shouldn't use $.each given we can use now the ES5 methods.
Popups => ag --js -Q '$.each'
tests/node-qunit/gateway/mediawiki.test.js
132: $.each( errorCases, function ( _, data ) {
138: $.each( successCases, function ( _, data ) {
src/ui/renderer.js
688: $.each( rects, function ( i, rect ) {
src/formatter.js
61: $.each( extract, function ( index, part ) {Acceptance criteria
- Fix the issues.
- Merge https://gerrit.wikimedia.org/r/420793 to stop them happening again.