From 51646ddaeaeac0abe1a5ac36d97949400a6a0402 Mon Sep 17 00:00:00 2001 From: "James D. Forrester" Date: Sat, 5 Sep 2015 12:11:47 -0700 Subject: [PATCH] build: Enable jscs jsDoc rule 'requireNewlineAfterDescription' and make pass Change-Id: I14d699f66cef87f0d93d773902c0a5326025a58c --- .jscsrc | 1 + resources/src/jquery/jquery.expandableField.js | 1 + resources/src/jquery/jquery.localize.js | 2 +- .../src/jquery/jquery.qunit.completenessTest.js | 2 +- resources/src/jquery/jquery.suggestions.js | 4 ++++ resources/src/jquery/jquery.tablesorter.js | 1 + resources/src/jquery/jquery.textSelection.js | 1 + .../src/mediawiki.api/mediawiki.api.edit.js | 1 + .../src/mediawiki.api/mediawiki.api.login.js | 1 + .../src/mediawiki.api/mediawiki.api.upload.js | 6 ++++++ .../mediawiki.language.numbers.js | 6 ++++-- resources/src/mediawiki.legacy/protect.js | 1 + .../src/mediawiki.page/mediawiki.page.gallery.js | 1 + .../mediawiki.special.changeemail.js | 1 + .../mw.widgets.CalendarWidget.js | 4 ++++ .../mediawiki.ForeignStructuredUpload.js | 10 ++++++++++ resources/src/mediawiki/mediawiki.Upload.js | 16 ++++++++++++++++ .../mediawiki/mediawiki.confirmCloseWindow.js | 3 +++ resources/src/mediawiki/mediawiki.errorLogger.js | 3 +++ resources/src/mediawiki/mediawiki.feedback.js | 3 +++ resources/src/mediawiki/mediawiki.jqueryMsg.js | 13 +++++++++++++ resources/src/mediawiki/mediawiki.js | 11 +++++++++++ .../src/mediawiki/mediawiki.notification.js | 2 ++ .../src/mediawiki/mediawiki.searchSuggest.js | 2 ++ tests/qunit/data/testrunner.js | 1 + .../suites/resources/mediawiki/mediawiki.test.js | 3 ++- 26 files changed, 95 insertions(+), 5 deletions(-) diff --git a/.jscsrc b/.jscsrc index 9ab6f3cc71..aaa876c3e2 100644 --- a/.jscsrc +++ b/.jscsrc @@ -7,6 +7,7 @@ "disallowQuotedKeysInObjects": "allButReserved", "requireDotNotation": { "allExcept": [ "keywords" ] }, "jsDoc": { + "requireNewlineAfterDescription": true, "requireParamTypes": true, "requireReturnTypes": true }, diff --git a/resources/src/jquery/jquery.expandableField.js b/resources/src/jquery/jquery.expandableField.js index 10c11ea834..221e6bbe59 100644 --- a/resources/src/jquery/jquery.expandableField.js +++ b/resources/src/jquery/jquery.expandableField.js @@ -39,6 +39,7 @@ }, /** * Sets the value of a property, and updates the widget accordingly + * * @param {String} property Name of property * @param {Mixed} value Value to set property with */ diff --git a/resources/src/jquery/jquery.localize.js b/resources/src/jquery/jquery.localize.js index 2122146cd2..f5932b246f 100644 --- a/resources/src/jquery/jquery.localize.js +++ b/resources/src/jquery/jquery.localize.js @@ -5,8 +5,8 @@ /** * Gets a localized message, using parameters from options if present. - * @ignore * + * @ignore * @param {Object} options * @param {string} key * @return {string} Localized message diff --git a/resources/src/jquery/jquery.qunit.completenessTest.js b/resources/src/jquery/jquery.qunit.completenessTest.js index d890d95630..785b27387c 100644 --- a/resources/src/jquery/jquery.qunit.completenessTest.js +++ b/resources/src/jquery/jquery.qunit.completenessTest.js @@ -51,8 +51,8 @@ /** * CompletenessTest - * @constructor * + * @constructor * @example * var myTester = new CompletenessTest( myLib ); * @param {Object} masterVariable The root variable that contains all object diff --git a/resources/src/jquery/jquery.suggestions.js b/resources/src/jquery/jquery.suggestions.js index c43e0ff55f..dc1c7794f6 100644 --- a/resources/src/jquery/jquery.suggestions.js +++ b/resources/src/jquery/jquery.suggestions.js @@ -142,6 +142,7 @@ $.suggestions = { * call to this function still pending will be canceled. If the value in the * textbox is empty or hasn't changed since the last time suggestions were fetched, * this function does nothing. + * * @param {boolean} delayed Whether or not to delay this by the currently configured amount of time */ update: function ( context, delayed ) { @@ -229,6 +230,7 @@ $.suggestions = { /** * Sets the value of a property, and updates the widget accordingly + * * @param {string} property Name of property * @param {Mixed} value Value to set property with */ @@ -415,6 +417,7 @@ $.suggestions = { /** * Highlight a result in the results table + * * @param {jQuery|string} result `` to highlight, or 'prev' or 'next' * @param {boolean} updateTextbox If true, put the suggestion in the textbox */ @@ -484,6 +487,7 @@ $.suggestions = { /** * Respond to keypress event + * * @param {number} key Code of key pressed */ keypress: function ( e, context, key ) { diff --git a/resources/src/jquery/jquery.tablesorter.js b/resources/src/jquery/jquery.tablesorter.js index 81a20d07bf..23474c0c51 100644 --- a/resources/src/jquery/jquery.tablesorter.js +++ b/resources/src/jquery/jquery.tablesorter.js @@ -248,6 +248,7 @@ * * After this, it will look at all rows at the bottom for footer rows * And place these in a tfoot using similar rules. + * * @param {jQuery} $table jQuery object for a */ function emulateTHeadAndFoot( $table ) { diff --git a/resources/src/jquery/jquery.textSelection.js b/resources/src/jquery/jquery.textSelection.js index 95c0346c12..b901642495 100644 --- a/resources/src/jquery/jquery.textSelection.js +++ b/resources/src/jquery/jquery.textSelection.js @@ -411,6 +411,7 @@ * * Scroll a textarea to the current cursor position. You can set the cursor * position with setSelection() + * * @param {boolean} options Whether to force a scroll even if the caret position * is already visible. Defaults to false * diff --git a/resources/src/mediawiki.api/mediawiki.api.edit.js b/resources/src/mediawiki.api/mediawiki.api.edit.js index e6161e422e..e43285ff11 100644 --- a/resources/src/mediawiki.api/mediawiki.api.edit.js +++ b/resources/src/mediawiki.api/mediawiki.api.edit.js @@ -31,6 +31,7 @@ /** * Post a new section to the page. + * * @see #postWithEditToken * @param {mw.Title|String} title Target page * @param {string} header diff --git a/resources/src/mediawiki.api/mediawiki.api.login.js b/resources/src/mediawiki.api/mediawiki.api.login.js index 25257927b4..2b709aae7b 100644 --- a/resources/src/mediawiki.api/mediawiki.api.login.js +++ b/resources/src/mediawiki.api/mediawiki.api.login.js @@ -1,5 +1,6 @@ /** * Make the two-step login easier. + * * @author Niklas Laxström * @class mw.Api.plugin.login * @since 1.22 diff --git a/resources/src/mediawiki.api/mediawiki.api.upload.js b/resources/src/mediawiki.api/mediawiki.api.upload.js index cc0bef0d34..4abff28f62 100644 --- a/resources/src/mediawiki.api/mediawiki.api.upload.js +++ b/resources/src/mediawiki.api/mediawiki.api.upload.js @@ -1,5 +1,6 @@ /** * Provides an interface for uploading files to MediaWiki. + * * @class mw.Api.plugin.upload * @singleton */ @@ -18,6 +19,7 @@ /** * @private * Get nonce for iframe IDs on the page. + * * @return {number} */ function getNonce() { @@ -27,6 +29,7 @@ /** * @private * Get new iframe object for an upload. + * * @return {HTMLIframeElement} */ function getNewIframe( id ) { @@ -39,6 +42,7 @@ /** * @private * Shortcut for getting hidden inputs + * * @return {jQuery} */ function getHiddenInput( name, val ) { @@ -297,6 +301,7 @@ * This function will return a promise, which when resolved, will pass back a function * to finish the stash upload. You can call that function with an argument containing * more, or conflicting, data to pass to the server. For example: + * * // upload a file to the stash with a placeholder filename * api.uploadToStash( file, { filename: 'testing.png' } ).done( function ( finish ) { * // finish is now the function we can use to finalize the upload @@ -305,6 +310,7 @@ * // the upload is complete, data holds the API response * } ); * } ); + * * @param {File|HTMLInputElement} file * @param {Object} [data] * @return {jQuery.Promise} diff --git a/resources/src/mediawiki.language/mediawiki.language.numbers.js b/resources/src/mediawiki.language/mediawiki.language.numbers.js index 32df68c6ae..268985f8e4 100644 --- a/resources/src/mediawiki.language/mediawiki.language.numbers.js +++ b/resources/src/mediawiki.language/mediawiki.language.numbers.js @@ -208,7 +208,8 @@ }, /** - * Get the digit transform table for current UI language. + * Get the digit transform table for current UI language. + * * @return {Object|Array} */ getDigitTransformTable: function () { @@ -217,7 +218,8 @@ }, /** - * Get the separator transform table for current UI language. + * Get the separator transform table for current UI language. + * * @return {Object|Array} */ getSeparatorTransformTable: function () { diff --git a/resources/src/mediawiki.legacy/protect.js b/resources/src/mediawiki.legacy/protect.js index d76b707876..6226c90b8d 100644 --- a/resources/src/mediawiki.legacy/protect.js +++ b/resources/src/mediawiki.legacy/protect.js @@ -177,6 +177,7 @@ var ProtectionForm = window.ProtectionForm = { /** * Find the highest protection level in any selector + * * @return {number} */ getMaxLevel: function () { diff --git a/resources/src/mediawiki.page/mediawiki.page.gallery.js b/resources/src/mediawiki.page/mediawiki.page.gallery.js index bf34dec580..dfccf21516 100644 --- a/resources/src/mediawiki.page/mediawiki.page.gallery.js +++ b/resources/src/mediawiki.page/mediawiki.page.gallery.js @@ -12,6 +12,7 @@ /** * Perform the layout justification. + * * @ignore * @context {HTMLElement} A `ul.mw-gallery-*` element */ diff --git a/resources/src/mediawiki.special/mediawiki.special.changeemail.js b/resources/src/mediawiki.special/mediawiki.special.changeemail.js index 67531f78bc..06851b9372 100644 --- a/resources/src/mediawiki.special/mediawiki.special.changeemail.js +++ b/resources/src/mediawiki.special/mediawiki.special.changeemail.js @@ -4,6 +4,7 @@ ( function ( mw, $ ) { /** * Given an email validity status (true, false, null) update the label CSS class + * * @ignore */ function updateMailValidityLabel( mail ) { diff --git a/resources/src/mediawiki.widgets/mw.widgets.CalendarWidget.js b/resources/src/mediawiki.widgets/mw.widgets.CalendarWidget.js index b914f36b5c..d519c0df54 100644 --- a/resources/src/mediawiki.widgets/mw.widgets.CalendarWidget.js +++ b/resources/src/mediawiki.widgets/mw.widgets.CalendarWidget.js @@ -310,6 +310,7 @@ /** * Handle click events on the "up" button, switching to less precise view. + * * @private */ mw.widgets.CalendarWidget.prototype.onUpButtonClick = function () { @@ -327,6 +328,7 @@ /** * Handle click events on the "previous" button, switching to previous pane. + * * @private */ mw.widgets.CalendarWidget.prototype.onPrevButtonClick = function () { @@ -346,6 +348,7 @@ /** * Handle click events on the "next" button, switching to next pane. + * * @private */ mw.widgets.CalendarWidget.prototype.onNextButtonClick = function () { @@ -367,6 +370,7 @@ * Handle click events anywhere in the body of the widget, which contains the matrix of days, * months or years to choose. Maybe change the pane or switch to more precise view, depending on * what gets clicked. + * * @private */ mw.widgets.CalendarWidget.prototype.onBodyClick = function ( e ) { diff --git a/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.js b/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.js index 0c06a83b18..fe8520bfe1 100644 --- a/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.js +++ b/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.js @@ -28,6 +28,7 @@ /** * Add categories to the upload. + * * @param {string[]} categories Array of categories to which this upload will be added. */ ForeignStructuredUpload.prototype.addCategories = function ( categories ) { @@ -41,6 +42,7 @@ /** * Add a description to the upload. + * * @param {string} language The language code for the description's language. Must have a template on the target wiki to work properly. * @param {string} description The description of the file. */ @@ -53,6 +55,7 @@ /** * Set the date of creation for the upload. + * * @param {Date} date */ ForeignStructuredUpload.prototype.setDate = function ( date ) { @@ -62,6 +65,7 @@ /** * Get the text of the file page, to be created on upload. Brings together * several different pieces of information to create useful text. + * * @return {string} */ ForeignStructuredUpload.prototype.getText = function () { @@ -85,6 +89,7 @@ /** * Gets the wikitext for the creation date of this upload. + * * @private * @return {string} */ @@ -99,6 +104,7 @@ /** * Gets the name of the template to use for creating the file metadata. * Override in subclasses for other templates. + * * @private * @return {string} */ @@ -109,6 +115,7 @@ /** * Fetches the wikitext for any descriptions that have been added * to the upload. + * * @private * @return {string} */ @@ -126,6 +133,7 @@ /** * Fetches the wikitext for the categories to which the upload will * be added. + * * @private * @return {string} */ @@ -142,6 +150,7 @@ /** * Gets the wikitext for the license of the upload. Abstract for now. + * * @private * @return {string} */ @@ -151,6 +160,7 @@ /** * Get the username. + * * @private * @return {string} */ diff --git a/resources/src/mediawiki/mediawiki.Upload.js b/resources/src/mediawiki/mediawiki.Upload.js index 07a0b75ffa..79628de50d 100644 --- a/resources/src/mediawiki/mediawiki.Upload.js +++ b/resources/src/mediawiki/mediawiki.Upload.js @@ -64,6 +64,7 @@ /** * Set the text of the file page, to be created on file upload. + * * @param {string} text */ UP.setText = function ( text ) { @@ -72,6 +73,7 @@ /** * Set the filename, to be finalized on upload. + * * @param {string} filename */ UP.setFilename = function ( filename ) { @@ -94,6 +96,7 @@ /** * Set the file to be uploaded. + * * @param {HTMLInputElement|File} file */ UP.setFile = function ( file ) { @@ -102,6 +105,7 @@ /** * Set whether the file should be watchlisted after upload. + * * @param {boolean} watchlist */ UP.setWatchlist = function ( watchlist ) { @@ -110,6 +114,7 @@ /** * Set the edit comment for the upload. + * * @param {string} comment */ UP.setComment = function ( comment ) { @@ -118,6 +123,7 @@ /** * Get the text of the file page, to be created on file upload. + * * @return {string} */ UP.getText = function () { @@ -126,6 +132,7 @@ /** * Get the filename, to be finalized on upload. + * * @return {string} */ UP.getFilename = function () { @@ -134,6 +141,7 @@ /** * Get the file being uploaded. + * * @return {HTMLInputElement|File} */ UP.getFile = function () { @@ -142,6 +150,7 @@ /** * Get the boolean for whether the file will be watchlisted after upload. + * * @return {boolean} */ UP.getWatchlist = function () { @@ -150,6 +159,7 @@ /** * Get the current value of the edit comment for the upload. + * * @return {string} */ UP.getComment = function () { @@ -158,6 +168,7 @@ /** * Gets the base filename from a path name. + * * @param {string} path * @return {string} */ @@ -178,6 +189,7 @@ /** * Gets the state of the upload. + * * @return {mw.Upload.State} */ UP.getState = function () { @@ -188,6 +200,7 @@ * Get the imageinfo object for the finished upload. * Only available once the upload is finished! Don't try to get it * beforehand. + * * @return {Object|undefined} */ UP.getImageInfo = function () { @@ -196,6 +209,7 @@ /** * Upload the file directly. + * * @return {jQuery.Promise} */ UP.upload = function () { @@ -227,6 +241,7 @@ /** * Upload the file to the stash to be completed later. + * * @return {jQuery.Promise} */ UP.uploadToStash = function () { @@ -256,6 +271,7 @@ /** * Finish a stash upload. + * * @return {jQuery.Promise} */ UP.finishStashUpload = function () { diff --git a/resources/src/mediawiki/mediawiki.confirmCloseWindow.js b/resources/src/mediawiki/mediawiki.confirmCloseWindow.js index b3cb758c97..4d0c1352de 100644 --- a/resources/src/mediawiki/mediawiki.confirmCloseWindow.js +++ b/resources/src/mediawiki/mediawiki.confirmCloseWindow.js @@ -77,12 +77,14 @@ /** * Return the object with functions to release and manually trigger the confirm alert + * * @ignore */ return { /** * Remove all event listeners and don't show an alert anymore, if the user wants to leave * the page. + * * @ignore */ release: function () { @@ -92,6 +94,7 @@ * Trigger the module's function manually: Check, if options.test() returns true and show * an alert to the user if he/she want to leave this page. Returns false, if options.test() returns * false or the user cancelled the alert window (~don't leave the page), true otherwise. + * * @ignore * @return {boolean} */ diff --git a/resources/src/mediawiki/mediawiki.errorLogger.js b/resources/src/mediawiki/mediawiki.errorLogger.js index 9f4f19ddc3..46b8479724 100644 --- a/resources/src/mediawiki/mediawiki.errorLogger.js +++ b/resources/src/mediawiki/mediawiki.errorLogger.js @@ -1,5 +1,6 @@ /** * Try to catch errors in modules which don't do their own error handling. + * * @class mw.errorLogger * @singleton */ @@ -24,6 +25,7 @@ /** * Install a window.onerror handler that will report via mw.track, while preserving * any previous handler. + * * @param {Object} window */ installGlobalHandler: function ( window ) { @@ -35,6 +37,7 @@ /** * Dumb window.onerror handler which forwards the errors via mw.track. + * * @fires global_error */ window.onerror = function ( errorMessage, url, lineNumber, columnNumber, errorObject ) { diff --git a/resources/src/mediawiki/mediawiki.feedback.js b/resources/src/mediawiki/mediawiki.feedback.js index d90ca4bd65..d226ed9d6a 100644 --- a/resources/src/mediawiki/mediawiki.feedback.js +++ b/resources/src/mediawiki/mediawiki.feedback.js @@ -86,6 +86,7 @@ * Respond to dialog submit event. If the information was * submitted, either successfully or with an error, open * a MessageDialog to thank the user. + * * @param {string} [status] A status of the end of operation * of the main feedback dialog. Empty if the dialog was * dismissed with no action or the user followed the button @@ -486,6 +487,7 @@ /** * Set the bug report link + * * @param {string} link Link to the external bug report form */ mw.Feedback.Dialog.prototype.setBugReportLink = function ( link ) { @@ -494,6 +496,7 @@ /** * Get the bug report link + * * @returns {string} Link to the external bug report form */ mw.Feedback.Dialog.prototype.getBugReportLink = function () { diff --git a/resources/src/mediawiki/mediawiki.jqueryMsg.js b/resources/src/mediawiki/mediawiki.jqueryMsg.js index f778b7f473..ce92423d89 100644 --- a/resources/src/mediawiki/mediawiki.jqueryMsg.js +++ b/resources/src/mediawiki/mediawiki.jqueryMsg.js @@ -105,6 +105,7 @@ * Try to parse a key and optional replacements, returning a jQuery object that may be a tree of jQuery nodes. * If there was an error parsing, return the key and the error message (wrapped in jQuery). This should put the error right into * the interface, without causing the page to halt script execution, and it hopefully should be clearer how to fix it. + * * @private * @param {Object} options Parser options * @return {Function} @@ -266,6 +267,7 @@ * Where the magic happens. * Parses a message from the key, and swaps in replacements as necessary, wraps in jQuery * If an error is thrown, returns original key, and logs the error + * * @param {string} key Message key. * @param {Array} replacements Variable replacements for $1, $2... $n * @return {jQuery} @@ -277,6 +279,7 @@ /** * Fetch the message string associated with a key, return parsed structure. Memoized. * Note that we pass '[' + key + ']' back for a missing message here. + * * @param {string} key * @return {string|Array} string of '[key]' if message missing, simple string if possible, array of arrays if needs parsing */ @@ -327,6 +330,7 @@ /** * Try parsers until one works, if none work return null + * * @private * @param {Function[]} ps * @return {string|null} @@ -347,6 +351,7 @@ /** * Try several ps in a row, all must succeed or return null. * This is the only eager one. + * * @private * @param {Function[]} ps * @return {string|null} @@ -369,6 +374,7 @@ /** * Run the same parser over and over until it fails. * Must succeed a minimum of n times or return null. + * * @private * @param {number} n * @param {Function} p @@ -411,6 +417,7 @@ /** * Just make parsers out of simpler JS builtin types + * * @private * @param {string} s * @return {Function} @@ -921,6 +928,7 @@ /** * (We put this method definition here, and not in prototype, to make sure it's not overwritten by any magic.) * Walk entire node structure, applying replacements and template functions when appropriate + * * @param {Mixed} node Abstract syntax tree (top node or subnode) * @param {Array} replacements for $1, $2, ... $n * @return {Mixed} single-string node or array of nodes suitable for jQuery appending @@ -970,6 +978,7 @@ * Parsing has been applied depth-first we can assume that all nodes here are single nodes * Must return a single node to parents -- a jQuery with synthetic span * However, unwrap any other synthetic spans in our children and pass them upwards + * * @param {Mixed[]} nodes Some single nodes, some arrays of nodes * @return {jQuery} */ @@ -1137,6 +1146,7 @@ * Transform parsed structure into pluralization * n.b. The first node may be a non-integer (for instance, a string representing an Arabic number). * So convert it back with the current language's convertNumber. + * * @param {Array} nodes List of nodes, [ {string|number}, {string}, {string} ... ] * @return {string} selected pluralized form according to current language */ @@ -1215,6 +1225,7 @@ /** * Transform parsed structure into grammar conversion. * Invoked by putting `{{grammar:form|word}}` in a message + * * @param {Array} nodes List of nodes [{Grammar case eg: genitive}, {string word}] * @return {string} selected grammatical form according to current language */ @@ -1227,6 +1238,7 @@ /** * Tranform parsed structure into a int: (interface language) message include * Invoked by putting `{{int:othermessage}}` into a message + * * @param {Array} nodes List of nodes * @return {string} Other message */ @@ -1239,6 +1251,7 @@ * Takes an unformatted number (arab, no group separators and . as decimal separator) * and outputs it in the localized digit script and formatted with decimal * separator, according to the current language. + * * @param {Array} nodes List of nodes * @return {number|string} Formatted number */ diff --git a/resources/src/mediawiki/mediawiki.js b/resources/src/mediawiki/mediawiki.js index ef6080bb4e..93a2010870 100644 --- a/resources/src/mediawiki/mediawiki.js +++ b/resources/src/mediawiki/mediawiki.js @@ -582,6 +582,7 @@ /** * Dummy placeholder for {@link mw.log} + * * @method */ log: ( function () { @@ -1185,6 +1186,7 @@ /** * Define loop-function here for efficiency * and to avoid re-using badly scoped variables. + * * @ignore */ function addLink( media, url ) { @@ -1427,6 +1429,7 @@ /** * Converts a module map of the form { foo: [ 'bar', 'baz' ], bar: [ 'baz, 'quux' ] } * to a query string of the form foo.bar,baz|bar.baz,quux + * * @private */ function buildModulesString( moduleMap ) { @@ -1442,6 +1445,7 @@ /** * Load modules from load.php + * * @private * @param {Object} moduleMap Module map, see #buildModulesString * @param {Object} currReqBase Object with other parameters (other than 'modules') to use in the request @@ -2042,6 +2046,7 @@ /** * Construct a JSON-serializable object representing the content of the store. + * * @return {Object} Module store contents. */ toJSON: function () { @@ -2060,6 +2065,7 @@ /** * Get a key on which to vary the module cache. + * * @return {string} String of concatenated vary conditions. */ getVary: function () { @@ -2409,6 +2415,7 @@ /** * Wrapper object for raw HTML passed to mw.html.element(). + * * @class mw.html.Raw */ Raw: function ( value ) { @@ -2417,6 +2424,7 @@ /** * Wrapper object for CDATA element contents passed to mw.html.element() + * * @class mw.html.Cdata */ Cdata: function ( value ) { @@ -2489,6 +2497,7 @@ return { /** * Register a hook handler + * * @param {Function...} handler Function to bind. * @chainable */ @@ -2496,6 +2505,7 @@ /** * Unregister a hook handler + * * @param {Function...} handler Function to unbind. * @chainable */ @@ -2503,6 +2513,7 @@ /** * Run a hook. + * * @param {Mixed...} data * @chainable */ diff --git a/resources/src/mediawiki/mediawiki.notification.js b/resources/src/mediawiki/mediawiki.notification.js index b5e8dae5e8..f361ec86de 100644 --- a/resources/src/mediawiki/mediawiki.notification.js +++ b/resources/src/mediawiki/mediawiki.notification.js @@ -370,6 +370,7 @@ /** * Initialisation. * Must only be called once, and not before the document is ready. + * * @ignore */ function init() { @@ -420,6 +421,7 @@ /** * Pause auto-hide timers for all notifications. * Notifications will not auto-hide until resume is called. + * * @see mw.Notification#pause */ pause: function () { diff --git a/resources/src/mediawiki/mediawiki.searchSuggest.js b/resources/src/mediawiki/mediawiki.searchSuggest.js index 3c4f32ebd2..6c7484e26b 100644 --- a/resources/src/mediawiki/mediawiki.searchSuggest.js +++ b/resources/src/mediawiki/mediawiki.searchSuggest.js @@ -72,6 +72,7 @@ /** * Callback that's run when the user changes the search input text * 'this' is the search input box (jQuery object) + * * @ignore */ function onBeforeUpdate() { @@ -88,6 +89,7 @@ /** * Callback that's run when suggestions have been updated either from the cache or the API * 'this' is the search input box (jQuery object) + * * @ignore */ function onAfterUpdate() { diff --git a/tests/qunit/data/testrunner.js b/tests/qunit/data/testrunner.js index b57b6cfd9f..01f9625204 100644 --- a/tests/qunit/data/testrunner.js +++ b/tests/qunit/data/testrunner.js @@ -164,6 +164,7 @@ /** * Reset mw.config and others to a fresh copy of the live config for each test(), * and restore it back to the live one afterwards. + * * @param {Object} [localEnv] * @example (see test suite at the bottom of this file) * diff --git a/tests/qunit/suites/resources/mediawiki/mediawiki.test.js b/tests/qunit/suites/resources/mediawiki/mediawiki.test.js index f7ca45b552..998887deb6 100644 --- a/tests/qunit/suites/resources/mediawiki/mediawiki.test.js +++ b/tests/qunit/suites/resources/mediawiki/mediawiki.test.js @@ -340,8 +340,9 @@ * The sync style load test (for @import). This is, in a way, also an open bug for * ResourceLoader ("execute js after styles are loaded"), but browsers don't offer a * way to get a callback from when a stylesheet is loaded (that is, including any - * @import rules inside). To work around this, we'll have a little time loop to check + * `@import` rules inside). To work around this, we'll have a little time loop to check * if the styles apply. + * * Note: This test originally used new Image() and onerror to get a callback * when the url is loaded, but that is fragile since it doesn't monitor the * same request as the css @import, and Safari 4 has issues with -- 2.20.1