"disallowQuotedKeysInObjects": "allButReserved",
"requireDotNotation": { "allExcept": [ "keywords" ] },
"jsDoc": {
+ "requireParamTypes": true,
"requireReturnTypes": true
},
},
/**
* Sets the value of a property, and updates the widget accordingly
- * @param property String Name of property
- * @param value Mixed Value to set property with
+ * @param {String} property Name of property
+ * @param {Mixed} value Value to set property with
*/
configure: function ( context, property, value ) {
// TODO: Validate creation using fallback values
*
* @example
* var myTester = new CompletenessTest( myLib );
- * @param masterVariable {Object} The root variable that contains all object
+ * @param {Object} masterVariable The root variable that contains all object
* members. CompletenessTest will recursively traverse objects and keep track
* of all methods.
- * @param ignoreFn {Function} Optionally pass a function to filter out certain
+ * @param {Function} [ignoreFn] Optionally pass a function to filter out certain
* methods. Example: You may want to filter out instances of jQuery or some
* other constructor. Otherwise "missingTests" will include all methods that
* were not called from that instance.
* Depending on the action it either injects our listener into the methods, or
* reads from our tracker and records which methods have not been called by the test suite.
*
- * @param currName {String|Null} Name of the given object member (Initially this is null).
- * @param currVar {mixed} The variable to check (initially an object,
+ * @param {String|Null} currName Name of the given object member (Initially this is null).
+ * @param {mixed} currVar The variable to check (initially an object,
* further down it could be anything).
- * @param masterVariable {Object} Throughout our interation, always keep track of the master/root.
+ * @param {Object} masterVariable Throughout our interation, always keep track of the master/root.
* Initially this is the same as currVar.
- * @param parentPathArray {Array} Array of names that indicate our breadcrumb path starting at
+ * @param {Array} parentPathArray Array of names that indicate our breadcrumb path starting at
* masterVariable. Not including currName.
*/
walkTheObject: function ( currObj, currName, masterVariable, parentPathArray ) {
* was called during the test suite (as far as the tracker knows).
* If not it adds it to missingTests.
*
- * @param fnName {String}
+ * @param {String} fnName
* @return {Boolean}
*/
hasTest: function ( fnName ) {
* Injects a function (such as a spy that updates methodCallTracker when
* it's called) inside another function.
*
- * @param masterVariable {Object}
- * @param objectPathArray {Array}
- * @param injectFn {Function}
+ * @param {Object} masterVariable
+ * @param {Array} objectPathArray
+ * @param {Function} injectFn
*/
injectCheck: function ( obj, key, injectFn ) {
var spy,
*
* After this, it will look at all rows at the bottom for footer rows
* And place these in a tfoot using similar rules.
- * @param $table jQuery object for a <table>
+ * @param {jQuery} $table jQuery object for a <table>
*/
function emulateTHeadAndFoot( $table ) {
var $thead, $tfoot, i, len,
* Replace all rowspanned cells in the body with clones in each row, so sorting
* need not worry about them.
*
- * @param $table jQuery object for a <table>
+ * @param {jQuery} $table jQuery object for a <table>
*/
function explodeRowspans( $table ) {
var spanningRealCellIndex, rowSpan, colSpan,
monthNames: {},
/**
- * @param $tables {jQuery}
- * @param settings {Object} (optional)
+ * @param {jQuery} $tables
+ * @param {Object} [settings]
*/
construct: function ( $tables, settings ) {
return $tables.each( function ( i, table ) {
* Passing an empty array will reset sorting (basically just reset the headers
* making the table appear unsorted).
*
- * @param sortList {Array} (optional) List of sort objects.
+ * @param {Array} [sortList] List of sort objects.
*/
$table.data( 'tablesorter' ).sort = function ( sortList ) {
*
* Scroll a textarea to the current cursor position. You can set the cursor
* position with setSelection()
- * @param options boolean Whether to force a scroll even if the caret position
+ * @param {boolean} options Whether to force a scroll even if the caret position
* is already visible. Defaults to false
*
* @fixme document the options parameters (function body suggests options.force is a boolean, not options itself)
/**
* @ignore
* @context {Element} input
- * @param e {jQuery.Event}
+ * @param {jQuery.Event} e
*/
function updateDiffRadios() {
var nextState = 'before',
* It uses document.getElementById for security reasons (HTML injections in $()).
*
* @ignore
- * @param String name: the name of a tab without the prefix ("mw-prefsection-")
- * @param String mode: [optional] A hash will be set according to the current
+ * @param {String} name the name of a tab without the prefix ("mw-prefsection-")
+ * @param {String} [mode] A hash will be set according to the current
* open section. Set mode 'noHash' to surpress this.
*/
function switchPrefTab( name, mode ) {
* from the server, since the replacement is done at save time.
* It may, though, if the wikitext appears in extension-controlled content.
*
- * @param nodes
+ * @param {String[]} nodes
*/
wikilink: function ( nodes ) {
var page, anchor, url;
* For index.php use `mw.config.get( 'wgScript' )`.
*
* @since 1.18
- * @param str string Name of script (eg. 'api'), defaults to 'index'
- * @return {string} Address to script (eg. '/w/api.php' )
+ * @param {string} str Name of script (e.g. 'api'), defaults to 'index'
+ * @return {string} Address to script (e.g. '/w/api.php' )
*/
wikiScript: function ( str ) {
str = str || 'index';
/**
* Add bogus to url to prevent IE crazy caching
*
- * @param value {String} a relative path (eg. 'data/foo.js'
+ * @param {String} value a relative path (eg. 'data/foo.js'
* or 'data/test.php?foo=bar').
* @return {String} Such as 'data/foo.js?131031765087663960'
*/
/**
* 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 localEnv {Object} [optional]
+ * @param {Object} [localEnv]
* @example (see test suite at the bottom of this file)
* </code>
*/
/**
* Test factory for $.fn.textSelection( 'encapsulateText' )
*
- * @param options {object} associative array containing:
- * description {string}
- * input {string}
- * output {string}
- * start {int} starting char for selection
- * end {int} ending char for selection
- * params {object} add'l parameters for $().textSelection( 'encapsulateText' )
+ * @param {Object} options Associative configuration array
+ * @param {string} options.description Description
+ * @param {string} options.input Input
+ * @param {string} options.output Output
+ * @param {int} options.start Starting char for selection
+ * @param {int} options.end Ending char for selection
+ * @param {object} options.params Additional parameters for $().textSelection( 'encapsulateText' )
*/
function encapsulateTest( options ) {
var opt = $.extend( {