diff --git a/.eslintrc.json b/.eslintrc.json index 6d8cc99f..bdb43098 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,14 +1,12 @@ { "extends": "wikimedia", "env": { - "browser": true, - "jquery": true + "browser": true }, "globals": { - "mediaWiki": false, "CodeMirror": false, - "ve": false, "mw": false, + "$": false, "OO": false }, "rules": { diff --git a/resources/ext.CodeMirror.js b/resources/ext.CodeMirror.js index dbb4fd40..713c0c05 100644 --- a/resources/ext.CodeMirror.js +++ b/resources/ext.CodeMirror.js @@ -1,4 +1,4 @@ -( function ( mw, $ ) { +( function () { var useCodeMirror, codeMirror, api, originHooksTextarea, cmTextSelection, enableContentEditable = true; @@ -284,4 +284,4 @@ } } ); -}( mediaWiki, jQuery ) ); +}() ); diff --git a/resources/mode/mediawiki/tests/qunit/CodeMirror.mediawiki.test.js b/resources/mode/mediawiki/tests/qunit/CodeMirror.mediawiki.test.js index 6e9214a4..db389723 100644 --- a/resources/mode/mediawiki/tests/qunit/CodeMirror.mediawiki.test.js +++ b/resources/mode/mediawiki/tests/qunit/CodeMirror.mediawiki.test.js @@ -2,7 +2,7 @@ * MediaWiki CodeMirror tests. */ -( function ( $, mw ) { +( function () { /** * Keys are the titles of the test cases. Each has an 'input' and the expected 'output'. * @type {Object} @@ -135,4 +135,4 @@ } ); } ); } ); -}( jQuery, mediaWiki ) ); +}() ); diff --git a/resources/modules/ve-cm/.eslintrc.json b/resources/modules/ve-cm/.eslintrc.json new file mode 100644 index 00000000..2073cc7b --- /dev/null +++ b/resources/modules/ve-cm/.eslintrc.json @@ -0,0 +1,5 @@ +{ + "globals": { + "ve": false + } +} diff --git a/resources/modules/ve-cm/ve.ui.CodeMirror.init.js b/resources/modules/ve-cm/ve.ui.CodeMirror.init.js index e0bb7af7..cb7aafb9 100644 --- a/resources/modules/ve-cm/ve.ui.CodeMirror.init.js +++ b/resources/modules/ve-cm/ve.ui.CodeMirror.init.js @@ -1,4 +1,4 @@ -( function ( ve, mw ) { +( function () { mw.libs.ve.targetLoader.addPlugin( function () { var index, target = ve.init.mw.DesktopArticleTarget; @@ -8,4 +8,4 @@ target.static.actionGroups[ 1 ].include.splice( index, 0, 'codeMirror' ); } } ); -}( ve, mediaWiki ) ); +}() );