| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Temporarily disable no-var & prefer-const as resulting errors
need to be fixed manually.
Change-Id: I6cb62a2c70a4c1fc265a00b1f18af127ac9d5029
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These all concern iterating through objects
Replace $.each( obj, function ( key, value ) {} )
with
for ( var key in obj ) {
var value = arr[key];
..
}
OR
Object.keys( obj ).forEach( ( key ) {
var value = arr[key];
..
} );
Note I've not cleaned up all instances in this patch as I exhausted
the timebox I set myself
Additional change: Document second parameter to mw.jqueryMsg.HtmlEmitter
as optional which became obvious from this change.
Bug: T334853
Change-Id: I1ca870246e54648912ef2d0ea370e48058761b50
|
|
|
|
| |
Change-Id: Iee025a518962e68c5ec2c07d952f402cd2a7f69b
|
|
|
|
| |
Change-Id: I7b5d228a3de4b3006751a427dec907a5bebf2f51
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Follows-up Id6d13bbea6:
- '$': mw.loader.implement does this already.
- 'mw': Use the canonical name directly.
This replaces the following patterns:
File closures (common):
- `( function ( $, mw ) {` => `( function () {`
- `( function ( $ ) {` => `( function () {`
- `( function ( mw ) {` => `( function () {`
- `( function ( mw, $ ) {` => `( function () {`
File closures (rare):
- `( function ( mw, $, OO ) {` => `( function () {`
- `( function ( mw, OO, $ ) {` => `( function () {`
- `( function ( mw, document ) {` => `( function () {`
Combined dom-ready and file closure (rare):
- `jQuery( function ( $ ) {` => `$( function () {
- `jQuery( function () {` => `$( function () {
Remaining references in files without a closure, as found by
the new ESLint setting (rare):
- `jQuery` => `$`
- `mediaWiki` => `mw`
Change-Id: I7cf2426cde597259e8c6f3f6f615a1a81a0ca82b
|
|
|
|
|
|
|
|
|
|
|
| |
Even though Array.prototype.forEach only works on arrays, and
$.each is more generic, I think it makes sense to begin discouraging
the usage of $.each now. This can be overriden by ignore lines or
by Array.prototype.forEach compatible lines. This doesn't seem too
much of an ask of engineers and helps future migrations
Bug: T200877
Change-Id: I339cff311a830699c8e32f07cec338a39870c53f
|
|
Single-file modules to src/, the remaining as sub directories.
A few highlights:
* mediawiki.Upload.BookletLayout. (stylesheet: no image references)
* mediawiki.feedback - Also move the image to its own images/ subdir.
* mediawiki.searchSuggest. (stylesheet: no image references)
* mediawiki.toc. (stylesheet: no image references)
Also updated any other references to 'src/mediawiki/' that I could find
in core:
* Fixed references in docs/uidesign/*.html
* Remove redundant exclude from jsduck.json.
After this, there are 4 files remaining in src/mediawiki,
which are the 4 files used by the actual 'mediawiki' base module.
Bug: T193826
Change-Id: I8058652892a78b3f5976397bd850741dd5c92427
|