mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-23 22:03:39 +00:00
Udate jsdoc and use jsdoc-wmf-theme
Depends-On: Ic3861870c10f64d7f5414669a9d25b8ffb4c79a4 Change-Id: I6750e9bb6d5409e497b5605e3a4660734f5677ab
This commit is contained in:
parent
162aed289a
commit
a8aecda711
|
@ -12,7 +12,6 @@
|
|||
*
|
||||
* @param {Window} window
|
||||
* @param {HTMLElement} component
|
||||
* @return {void}
|
||||
*/
|
||||
function bind( window, component ) {
|
||||
var
|
||||
|
|
12
jsdoc.json
12
jsdoc.json
|
@ -4,7 +4,8 @@
|
|||
"package": "package.json",
|
||||
"pedantic": true,
|
||||
"readme": "README.md",
|
||||
"recurse": true
|
||||
"recurse": true,
|
||||
"template": "node_modules/jsdoc-wmf-theme"
|
||||
},
|
||||
"plugins": [
|
||||
"plugins/markdown"
|
||||
|
@ -16,6 +17,15 @@
|
|||
"cleverLinks": true,
|
||||
"default": {
|
||||
"useLongnameInNav": true
|
||||
},
|
||||
"wmf": {
|
||||
"linkMap": {
|
||||
"HTMLElement": "https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement",
|
||||
"jQuery": "https://api.jquery.com/Types/#jQuery",
|
||||
"Drawer": "https://doc.wikimedia.org/MobileFrontend/master/js/js/Drawer.html",
|
||||
"Icon": "https://doc.wikimedia.org/MobileFrontend/master/js/js/Icon.html",
|
||||
"View": "https://doc.wikimedia.org/MobileFrontend/master/js/js/View.html"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
61
package-lock.json
generated
61
package-lock.json
generated
|
@ -15,6 +15,7 @@
|
|||
"eslint-config-wikimedia": "0.25.1",
|
||||
"grunt-banana-checker": "0.11.0",
|
||||
"jsdoc": "3.6.10",
|
||||
"jsdoc-wmf-theme": "^0.0.8",
|
||||
"mwbot": "2.0.0",
|
||||
"pre-commit": "1.2.2",
|
||||
"stylelint-config-wikimedia": "0.15.0",
|
||||
|
@ -3489,6 +3490,12 @@
|
|||
"url": "https://github.com/fb55/domhandler?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/domino": {
|
||||
"version": "2.1.6",
|
||||
"resolved": "https://registry.npmjs.org/domino/-/domino-2.1.6.tgz",
|
||||
"integrity": "sha512-3VdM/SXBZX2omc9JF9nOPCtDaYQ67BGp5CoLpIQlO2KCAPETs8TcDHacF26jXadGbvUteZzRTeos2fhID5+ucQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/domutils": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz",
|
||||
|
@ -6367,6 +6374,23 @@
|
|||
"node": ">=12.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/jsdoc-wmf-theme": {
|
||||
"version": "0.0.8",
|
||||
"resolved": "https://registry.npmjs.org/jsdoc-wmf-theme/-/jsdoc-wmf-theme-0.0.8.tgz",
|
||||
"integrity": "sha512-0TSKpoEIwJgo2In5KQW3CImmODHV7bV7p0AyoyyF8wDPNA4Mvz4ZJ8TmhlpgWLyJzbefnVg4uxyEpElwdB3WPw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"domino": "^2.1.6",
|
||||
"lunr": "2.3.9",
|
||||
"taffydb": "^2.7.3"
|
||||
}
|
||||
},
|
||||
"node_modules/jsdoc-wmf-theme/node_modules/taffydb": {
|
||||
"version": "2.7.3",
|
||||
"resolved": "https://registry.npmjs.org/taffydb/-/taffydb-2.7.3.tgz",
|
||||
"integrity": "sha512-GQ3gtYFSOAxSMN/apGtDKKkbJf+8izz5YfbGqIsUc7AMiQOapARZ76dhilRY2h39cynYxBFdafQo5HUL5vgkrg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/jsdoc/node_modules/escape-string-regexp": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
|
||||
|
@ -6942,6 +6966,12 @@
|
|||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/lunr": {
|
||||
"version": "2.3.9",
|
||||
"resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz",
|
||||
"integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/map-obj": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz",
|
||||
|
@ -13443,6 +13473,12 @@
|
|||
"domelementtype": "^2.3.0"
|
||||
}
|
||||
},
|
||||
"domino": {
|
||||
"version": "2.1.6",
|
||||
"resolved": "https://registry.npmjs.org/domino/-/domino-2.1.6.tgz",
|
||||
"integrity": "sha512-3VdM/SXBZX2omc9JF9nOPCtDaYQ67BGp5CoLpIQlO2KCAPETs8TcDHacF26jXadGbvUteZzRTeos2fhID5+ucQ==",
|
||||
"dev": true
|
||||
},
|
||||
"domutils": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz",
|
||||
|
@ -15598,6 +15634,25 @@
|
|||
"integrity": "sha512-2a6eRxSxp1BW040hFvaJxhsCMI9lT8QB8t14t+NY5tC5rckIR0U9cr2tjOeaFirmEOy6MHvmJnY7zTBHq431Lw==",
|
||||
"dev": true
|
||||
},
|
||||
"jsdoc-wmf-theme": {
|
||||
"version": "0.0.8",
|
||||
"resolved": "https://registry.npmjs.org/jsdoc-wmf-theme/-/jsdoc-wmf-theme-0.0.8.tgz",
|
||||
"integrity": "sha512-0TSKpoEIwJgo2In5KQW3CImmODHV7bV7p0AyoyyF8wDPNA4Mvz4ZJ8TmhlpgWLyJzbefnVg4uxyEpElwdB3WPw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"domino": "^2.1.6",
|
||||
"lunr": "2.3.9",
|
||||
"taffydb": "^2.7.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"taffydb": {
|
||||
"version": "2.7.3",
|
||||
"resolved": "https://registry.npmjs.org/taffydb/-/taffydb-2.7.3.tgz",
|
||||
"integrity": "sha512-GQ3gtYFSOAxSMN/apGtDKKkbJf+8izz5YfbGqIsUc7AMiQOapARZ76dhilRY2h39cynYxBFdafQo5HUL5vgkrg==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"json-buffer": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",
|
||||
|
@ -16089,6 +16144,12 @@
|
|||
"yallist": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"lunr": {
|
||||
"version": "2.3.9",
|
||||
"resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz",
|
||||
"integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==",
|
||||
"dev": true
|
||||
},
|
||||
"map-obj": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz",
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
"eslint-config-wikimedia": "0.25.1",
|
||||
"grunt-banana-checker": "0.11.0",
|
||||
"jsdoc": "3.6.10",
|
||||
"jsdoc-wmf-theme": "^0.0.8",
|
||||
"mwbot": "2.0.0",
|
||||
"pre-commit": "1.2.2",
|
||||
"stylelint-config-wikimedia": "0.15.0",
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
* "treatment") to callers which is necessary if getBucket(). The downside is that now two
|
||||
* functions exist where one would suffice.
|
||||
*
|
||||
* @private
|
||||
* @return {string} AB-test bucket, `bucket.UNSAMPLED` by default, `bucket.CONTROL` or
|
||||
* `bucket.TREATMENT` buckets otherwise.
|
||||
*/
|
||||
|
@ -62,6 +63,7 @@
|
|||
/**
|
||||
* Checks whether or not a user is in the AB-test,
|
||||
*
|
||||
* @private
|
||||
* @return {boolean}
|
||||
*/
|
||||
function isSampled() {
|
||||
|
|
|
@ -34,8 +34,6 @@ function testScrollLeftStyle() {
|
|||
|
||||
/**
|
||||
* When tabs are present and one is selected, scroll the selected tab into view.
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
function initTabsScrollPosition() {
|
||||
var selectedTab, tabContainer, $tabContainer, maxScrollLeft, leftMostChild, rightMostChild,
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
/**
|
||||
* @param {Window} window
|
||||
* @param {Element} toolbar
|
||||
* @return {void}
|
||||
*/
|
||||
function bind( window, toolbar ) {
|
||||
var overflowSubmenu = toolbar.querySelector( overflowSubmenuSelector );
|
||||
|
@ -25,7 +24,6 @@
|
|||
/**
|
||||
* @param {Window} window
|
||||
* @param {Element} toolbar
|
||||
* @return {void}
|
||||
*/
|
||||
function render( window, toolbar ) {
|
||||
var overflowList = toolbar.querySelector( overflowListSelector );
|
||||
|
@ -80,7 +78,6 @@
|
|||
*
|
||||
* @param {Window} window
|
||||
* @param {Element|null} overflowList
|
||||
* @return {void}
|
||||
*/
|
||||
function renderDownloadButton( window, overflowList ) {
|
||||
var downloadPageAction = require( './downloadPageAction.js' ).downloadPageAction,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* @param {jQuery.Object} $item The added list item, or null if no element was added.
|
||||
* @param {jQuery} $item The added list item, or null if no element was added.
|
||||
* @return {Object} of arrays with mandatory class names for list item elements.
|
||||
*/
|
||||
function getClassesForItem( $item ) {
|
||||
|
@ -40,7 +40,7 @@ function getClassesForItem( $item ) {
|
|||
/**
|
||||
* Insert icon into the portlet link.
|
||||
*
|
||||
* @param {jQuery.Object} $link
|
||||
* @param {jQuery} $link
|
||||
* @param {string|undefined} id for icon
|
||||
*/
|
||||
function insertIcon( $link, id ) {
|
||||
|
|
|
@ -22,7 +22,7 @@ var mobile = mw.mobileFrontend.require( 'mobile.startup' ),
|
|||
* that user but to obtain information on them.
|
||||
*
|
||||
* @ignore
|
||||
* @param {jQuery.Object} $redLinks
|
||||
* @param {jQuery} $redLinks
|
||||
*/
|
||||
function initRedlinksCta( $redLinks ) {
|
||||
$redLinks.on( 'click', function ( ev ) {
|
||||
|
@ -53,7 +53,7 @@ function initRedlinksCta( $redLinks ) {
|
|||
/**
|
||||
* A CtaDrawer should show for anonymous users.
|
||||
*
|
||||
* @param {jQuery.Object} $watchstar
|
||||
* @param {jQuery} $watchstar
|
||||
*/
|
||||
function initWatchstarCta( $watchstar ) {
|
||||
var watchCtaDrawer;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
*
|
||||
* @ignore
|
||||
* @param {string} userAgent User Agent
|
||||
* @return {number|false} An integer.
|
||||
* @return {number|boolean} Integer version number, or false if not found
|
||||
*/
|
||||
function getAndroidVersion( userAgent ) {
|
||||
var match = userAgent.toLowerCase().match( /android\s(\d\.]*)/ );
|
||||
|
@ -23,7 +23,7 @@
|
|||
*
|
||||
* @ignore
|
||||
* @param {string} userAgent User Agent
|
||||
* @return {number|false} An integer.
|
||||
* @return {number|boolean} Integer version number, or false if not found
|
||||
*/
|
||||
function getChromeVersion( userAgent ) {
|
||||
var match = userAgent.toLowerCase().match( /chrom(e|ium)\/(\d+)\./ );
|
||||
|
@ -119,7 +119,7 @@
|
|||
* @param {number[]} supportedNamespaces
|
||||
* @param {Window} [windowObj] window object
|
||||
* @param {boolean} [overflowList] Append to overflow list
|
||||
* @return {jQuery.Object|null}
|
||||
* @return {jQuery|null}
|
||||
*/
|
||||
function downloadPageAction( page, supportedNamespaces, windowObj, overflowList ) {
|
||||
var
|
||||
|
|
|
@ -166,7 +166,7 @@ module.exports = function () {
|
|||
* months or years
|
||||
*
|
||||
* @ignore
|
||||
* @param {jQuery.Object} $lastModifiedLink
|
||||
* @param {jQuery} $lastModifiedLink
|
||||
*/
|
||||
function initHistoryLink( $lastModifiedLink ) {
|
||||
var delta, $msg, $bar,
|
||||
|
@ -225,7 +225,7 @@ module.exports = function () {
|
|||
|
||||
/**
|
||||
* @method
|
||||
* @param {jQuery.Object} $lastModifiedLink
|
||||
* @param {jQuery} $lastModifiedLink
|
||||
* @ignore
|
||||
*/
|
||||
function initAmcHistoryLink( $lastModifiedLink ) {
|
||||
|
@ -256,7 +256,7 @@ module.exports = function () {
|
|||
* months or years
|
||||
*
|
||||
* @ignore
|
||||
* @param {jQuery.Object} [$tagline]
|
||||
* @param {jQuery} [$tagline]
|
||||
*/
|
||||
function initRegistrationDate( $tagline ) {
|
||||
var msg, ts;
|
||||
|
@ -314,8 +314,7 @@ module.exports = function () {
|
|||
/**
|
||||
* Strip the edit action from red links to nonexistent User namespace pages.
|
||||
*
|
||||
* @param {jQuery.Object} $redLinks
|
||||
* @return {void}
|
||||
* @param {jQuery} $redLinks
|
||||
*/
|
||||
function initUserRedLinks( $redLinks ) {
|
||||
$redLinks.filter( function ( _, element ) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
( function ( M ) {
|
||||
/** @typedef {Object.<number | 'all', IssueSummary[]>} IssueSummaryMap */
|
||||
/** @typedef {Object.<string, IssueSummary[]>} IssueSummaryMap */
|
||||
|
||||
var PageHTMLParser = M.require( 'mobile.startup' ).PageHTMLParser,
|
||||
KEYWORD_ALL_SECTIONS = 'all',
|
||||
|
@ -34,7 +34,7 @@
|
|||
* @param {OverlayManager} overlayManager
|
||||
* @ignore
|
||||
*
|
||||
* @return {{ambox: jQuery.Object, issueSummaries: IssueSummary[]}}
|
||||
* @return {{ambox: jQuery, issueSummaries: IssueSummary[]}}
|
||||
*/
|
||||
function insertBannersOrNotice( pageHTMLParser, labelText, section, inline, overlayManager ) {
|
||||
var
|
||||
|
@ -97,7 +97,7 @@
|
|||
* @param {IssueSummaryMap} allIssues mapping section {number} to {IssueSummary}
|
||||
* @param {number|string} section either KEYWORD_ALL_SECTIONS or a number relating to the
|
||||
* section the issues belong to
|
||||
* @return {jQuery.Object[]} array of all issues.
|
||||
* @return {jQuery[]} array of all issues.
|
||||
*/
|
||||
function getIssues( allIssues, section ) {
|
||||
if ( section !== KEYWORD_ALL_SECTIONS ) {
|
||||
|
@ -125,9 +125,7 @@
|
|||
function initPageIssues( overlayManager, pageHTMLParser ) {
|
||||
var
|
||||
section,
|
||||
/** @type {IssueSummary[]} */
|
||||
issueSummaries = [],
|
||||
/** @type {IssueSummaryMap} */
|
||||
allIssues = {},
|
||||
label,
|
||||
$lead = pageHTMLParser.getLeadSectionElement(),
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
/**
|
||||
* @typedef {Object} IssueSummary
|
||||
* @property {PageIssue} issue
|
||||
* @property {jQuery.Object} $el where the issue was extracted from
|
||||
* @property {jQuery} $el where the issue was extracted from
|
||||
* @property {string} iconString a string representation of icon.
|
||||
* This is kept for template compatibility (our views do not yet support composition).
|
||||
* @property {string} text HTML string.
|
||||
|
|
|
@ -10,7 +10,7 @@ var watchstar = mw.loader.require( 'mediawiki.page.watch.ajax' ).watchstar;
|
|||
/**
|
||||
* Tweaks the global watchstar handler in core to use the correct classes for Minerva.
|
||||
*
|
||||
* @param {jQuery.Object} $icon
|
||||
* @param {jQuery} $icon
|
||||
*/
|
||||
function init( $icon ) {
|
||||
var $watchlink = $icon.find( 'a' );
|
||||
|
@ -19,7 +19,7 @@ var watchstar = mw.loader.require( 'mediawiki.page.watch.ajax' ).watchstar;
|
|||
|
||||
/**
|
||||
*
|
||||
* @param {jQuery.Object} $link
|
||||
* @param {jQuery} $link
|
||||
* @param {boolean} isWatched
|
||||
* @param {string} expiry
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue