diff --git a/.eslintrc.json b/.eslintrc.json index 31380abc..e188ff24 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -2,11 +2,11 @@ "extends": "wikimedia", "env": { "browser": true, - "jquery": true, "qunit": true }, "globals": { - "mediaWiki": false, + "mw": false, + "$": false, "OO": false }, "rules": {} diff --git a/modules/ext.thanks.corethank.js b/modules/ext.thanks.corethank.js index c0546692..55b06de0 100644 --- a/modules/ext.thanks.corethank.js +++ b/modules/ext.thanks.corethank.js @@ -1,4 +1,4 @@ -( function ( $, mw, OO ) { +( function () { 'use strict'; function reloadThankedState() { @@ -120,4 +120,4 @@ mw.hook( 'wikipage.diff' ).add( function ( $content ) { addActionToLinks( $content ); } ); -}( jQuery, mediaWiki, OO ) ); +}() ); diff --git a/modules/ext.thanks.flowthank.js b/modules/ext.thanks.flowthank.js index 64f8a0d4..818b1fc9 100644 --- a/modules/ext.thanks.flowthank.js +++ b/modules/ext.thanks.flowthank.js @@ -1,4 +1,4 @@ -( function ( $, mw, OO ) { +( function () { 'use strict'; var $thankedLabel = $( '' ) @@ -82,4 +82,4 @@ sendFlowThanks( $thankLink ); } ); -}( jQuery, mediaWiki, OO ) ); +}() ); diff --git a/modules/ext.thanks.mobilediff.js b/modules/ext.thanks.mobilediff.js index ccb1ee9a..68d2be85 100644 --- a/modules/ext.thanks.mobilediff.js +++ b/modules/ext.thanks.mobilediff.js @@ -1,4 +1,4 @@ -( function ( mw, $ ) { +( function () { /** * Attempt to execute a thank operation for a given edit * @@ -105,4 +105,4 @@ mw.thanks = $.extend( {}, mw.thanks || {}, { _mobileDiffInit: init } ); -}( mediaWiki, jQuery ) ); +}() ); diff --git a/modules/ext.thanks.thank.js b/modules/ext.thanks.thank.js index 2a0deb58..1d52ffe8 100644 --- a/modules/ext.thanks.thank.js +++ b/modules/ext.thanks.thank.js @@ -1,4 +1,4 @@ -( function ( $, mw ) { +( function () { 'use strict'; mw.thanks = { @@ -62,4 +62,4 @@ } }; -}( jQuery, mediaWiki ) ); +}() ); diff --git a/modules/jquery.findWithParent.js b/modules/jquery.findWithParent.js index 79c09c71..2ebb07c5 100644 --- a/modules/jquery.findWithParent.js +++ b/modules/jquery.findWithParent.js @@ -1,4 +1,4 @@ -( function ( $ ) { +( function () { /** @class jQuery */ /** @@ -54,4 +54,4 @@ return $elements; }; -}( jQuery ) ); +}() ); diff --git a/tests/qunit/test_ext.thanks.mobilediff.js b/tests/qunit/test_ext.thanks.mobilediff.js index 2c7911f4..0c0e6413 100644 --- a/tests/qunit/test_ext.thanks.mobilediff.js +++ b/tests/qunit/test_ext.thanks.mobilediff.js @@ -1,4 +1,4 @@ -( function ( $, mw ) { +( function () { QUnit.module( 'Thanks mobilediff' ); QUnit.test( 'render button for logged in users', function ( assert ) { @@ -12,4 +12,4 @@ assert.strictEqual( $container.find( '.mw-ui-button' ).length, 1, 'Thanks button was created.' ); } ); -}( jQuery, mediaWiki ) ); +}() );