Migrate from jsduck to jsdoc

Bug: T138401
Change-Id: Iae74fdcae5e8c2541416d8cec8de8221cfc282ef
This commit is contained in:
Adam Wight 2020-11-30 18:12:34 +01:00
parent 61f61d66d3
commit 1010e6fb78
11 changed files with 186 additions and 37 deletions

View file

@ -3,8 +3,7 @@
"extends": [
"wikimedia/client",
"wikimedia/jquery",
"wikimedia/mediawiki",
"wikimedia/jsduck"
"wikimedia/mediawiki"
],
"rules": {
"max-len": "off",

20
jsdoc.json Normal file
View file

@ -0,0 +1,20 @@
{
"opts": {
"destination": "docs",
"package": "package.json",
"pedantic": true,
"recurse": true
},
"plugins": [
"plugins/markdown"
],
"source": {
"include": [ "modules" ]
},
"templates": {
"cleverLinks": true,
"default": {
"useLongnameInNav": true
}
}
}

View file

@ -1,19 +0,0 @@
/**
* @class jQuery
* <http://api.jquery.com/>
*/
/**
* @class jQuery.Event
* <http://api.jquery.com/Types/#Event>
*/
/**
* @class jQuery.Promise
* <http://api.jquery.com/Types/#Promise>
*/
/**
* @class ve.ui.Surface
* <https://doc.wikimedia.org/VisualEditor/master/#!/api/ve.ui.Surface>
*/

View file

@ -1,11 +0,0 @@
{
"--title": "TemplateData - Documentation",
"--processes": "0",
"--warnings-exit-nonzero": true,
"--external": "OO.*",
"--output": "docs",
"--": [
"jsduck.external.js",
"modules"
]
}

View file

@ -2,7 +2,7 @@
* TemplateData Model
*
* @class
* @mixins OO.EventEmitter
* @mixes OO.EventEmitter
*
* @constructor
*/

View file

@ -668,6 +668,7 @@ mw.TemplateData.Dialog.prototype.onMapsGroupSelect = function () {
* Stringify objects in the dialog with space of 4, mainly maps objects
*
* @param {Object} object maps object
* @return {string} serialized form
*/
mw.TemplateData.Dialog.prototype.stringifyObject = function ( object ) {
return JSON.stringify( object, null, 4 );
@ -1281,6 +1282,7 @@ mw.TemplateData.Dialog.prototype.importParametersFromTemplateCode = function ()
* Get a process for setting up a window for use.
*
* @param {Object} [data] Dialog opening data
* @return {OO.ui.Process} Setup process
*/
mw.TemplateData.Dialog.prototype.getSetupProcess = function ( data ) {
return mw.TemplateData.Dialog.super.prototype.getSetupProcess.call( this, data )

View file

@ -30,6 +30,7 @@ OO.inheritClass( mw.TemplateData.LanguageResultWidget, OO.ui.OptionWidget );
*
* @param {string} [query] Query text which matched this result
* @param {string} [matchedProperty] Data property which matched the query text
* @return {mw.TemplateData.LanguageResultWidget}
* @chainable
*/
mw.TemplateData.LanguageResultWidget.prototype.updateLabel = function ( query, matchedProperty ) {

View file

@ -3,7 +3,7 @@
*
* @class
* @extends OO.ui.SelectWidget
* @mixins OO.ui.mixin.DraggableGroupElement
* @mixes OO.ui.mixin.DraggableGroupElement
*
* @param {Object} config Dialog configuration object
*/

View file

@ -3,7 +3,7 @@
*
* @class
* @extends OO.ui.DecoratedOptionWidget
* @mixins OO.ui.mixin.DraggableElement
* @mixes OO.ui.mixin.DraggableElement
*
* @param {Object} data Parameter data
* @param {Object} [config] Configuration object

156
package-lock.json generated
View file

@ -666,6 +666,12 @@
}
}
},
"bluebird": {
"version": "3.7.2",
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz",
"integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==",
"dev": true
},
"body": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/body/-/body-5.1.0.tgz",
@ -762,6 +768,15 @@
"integrity": "sha512-w9Ph56jOsS8RL20K9cLND3u/+5WASWdhC/PPrf+V3/HsM3uHOavWOR1Xzakbv4Puo/srmPHudkmCRWM7Aq+/UA==",
"dev": true
},
"catharsis": {
"version": "0.8.11",
"resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.8.11.tgz",
"integrity": "sha512-a+xUyMV7hD1BrDQA/3iPV7oc+6W26BgVJO05PGEoatMyIuPScQKsde6i3YorWX1qs+AZjnJ18NqdKoCtKiNh1g==",
"dev": true,
"requires": {
"lodash": "^4.17.14"
}
},
"chalk": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
@ -2326,6 +2341,12 @@
"minimist": "^1.2.5"
}
},
"graceful-fs": {
"version": "4.2.4",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz",
"integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==",
"dev": true
},
"grunt": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/grunt/-/grunt-1.3.0.tgz",
@ -3119,6 +3140,51 @@
"esprima": "^4.0.0"
}
},
"js2xmlparser": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.1.tgz",
"integrity": "sha512-KrPTolcw6RocpYjdC7pL7v62e55q7qOMHvLX1UCLc5AAS8qeJ6nukarEJAF2KL2PZxlbGueEbINqZR2bDe/gUw==",
"dev": true,
"requires": {
"xmlcreate": "^2.0.3"
}
},
"jsdoc": {
"version": "3.6.6",
"resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.6.6.tgz",
"integrity": "sha512-znR99e1BHeyEkSvgDDpX0sTiTu+8aQyDl9DawrkOGZTTW8hv0deIFXx87114zJ7gRaDZKVQD/4tr1ifmJp9xhQ==",
"dev": true,
"requires": {
"@babel/parser": "^7.9.4",
"bluebird": "^3.7.2",
"catharsis": "^0.8.11",
"escape-string-regexp": "^2.0.0",
"js2xmlparser": "^4.0.1",
"klaw": "^3.0.0",
"markdown-it": "^10.0.0",
"markdown-it-anchor": "^5.2.7",
"marked": "^0.8.2",
"mkdirp": "^1.0.4",
"requizzle": "^0.2.3",
"strip-json-comments": "^3.1.0",
"taffydb": "2.6.2",
"underscore": "~1.10.2"
},
"dependencies": {
"escape-string-regexp": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
"integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==",
"dev": true
},
"mkdirp": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
"integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
"dev": true
}
}
},
"jsdoctypeparser": {
"version": "9.0.0",
"resolved": "https://registry.npmjs.org/jsdoctypeparser/-/jsdoctypeparser-9.0.0.tgz",
@ -3218,6 +3284,15 @@
"integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
"dev": true
},
"klaw": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz",
"integrity": "sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g==",
"dev": true,
"requires": {
"graceful-fs": "^4.1.9"
}
},
"known-css-properties": {
"version": "0.20.0",
"resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.20.0.tgz",
@ -3428,6 +3503,15 @@
"integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=",
"dev": true
},
"linkify-it": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz",
"integrity": "sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw==",
"dev": true,
"requires": {
"uc.micro": "^1.0.1"
}
},
"livereload-js": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/livereload-js/-/livereload-js-2.4.0.tgz",
@ -3554,6 +3638,39 @@
"object-visit": "^1.0.0"
}
},
"markdown-it": {
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-10.0.0.tgz",
"integrity": "sha512-YWOP1j7UbDNz+TumYP1kpwnP0aEa711cJjrAQrzd0UXlbJfc5aAq0F/PZHjiioqDC1NKgvIMX+o+9Bk7yuM2dg==",
"dev": true,
"requires": {
"argparse": "^1.0.7",
"entities": "~2.0.0",
"linkify-it": "^2.0.0",
"mdurl": "^1.0.1",
"uc.micro": "^1.0.5"
},
"dependencies": {
"entities": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/entities/-/entities-2.0.3.tgz",
"integrity": "sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ==",
"dev": true
}
}
},
"markdown-it-anchor": {
"version": "5.3.0",
"resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-5.3.0.tgz",
"integrity": "sha512-/V1MnLL/rgJ3jkMWo84UR+K+jF1cxNG1a+KwqeXqTIJ+jtA8aWSHuigx8lTzauiIjBDbwF3NcWQMotd0Dm39jA==",
"dev": true
},
"marked": {
"version": "0.8.2",
"resolved": "https://registry.npmjs.org/marked/-/marked-0.8.2.tgz",
"integrity": "sha512-EGwzEeCcLniFX51DhTpmTom+dSA/MG/OBUDjnWtHbEnjAH180VzUeAw+oE4+Zv+CoYBWyRlYOTR0N8SO9R1PVw==",
"dev": true
},
"mathml-tag-names": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/mathml-tag-names/-/mathml-tag-names-2.1.3.tgz",
@ -3592,6 +3709,12 @@
"integrity": "sha512-jVU0Nr2B9X3MU4tSK7JP1CMkSvOj7X5l/GboG1tKRw52lLF1x2Ju92Ms9tNetCcbfX3hzlM73zYo2NKkWSfF/A==",
"dev": true
},
"mdurl": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz",
"integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=",
"dev": true
},
"meow": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/meow/-/meow-8.0.0.tgz",
@ -4430,6 +4553,15 @@
"integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
"dev": true
},
"requizzle": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.3.tgz",
"integrity": "sha512-YanoyJjykPxGHii0fZP0uUPEXpvqfBDxWV7s6GKAiiOsiqhX6vHNyW3Qzdmqp/iq/ExbhaGbVrjB4ruEVSM4GQ==",
"dev": true,
"requires": {
"lodash": "^4.17.14"
}
},
"resolve": {
"version": "1.11.1",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.1.tgz",
@ -5296,6 +5428,12 @@
}
}
},
"taffydb": {
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/taffydb/-/taffydb-2.6.2.tgz",
"integrity": "sha1-fLy2S1oUG2ou/CxdLGe04VCyomg=",
"dev": true
},
"text-table": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
@ -5431,12 +5569,24 @@
"is-typedarray": "^1.0.0"
}
},
"uc.micro": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz",
"integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==",
"dev": true
},
"unc-path-regex": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz",
"integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=",
"dev": true
},
"underscore": {
"version": "1.10.2",
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.10.2.tgz",
"integrity": "sha512-N4P+Q/BuyuEKFJ43B9gYuOj4TQUHXX+j2FqguVOpjkssLUUrnJofCcBccJSCoeturDoZU6GorDTHSvUDlSQbTg==",
"dev": true
},
"underscore.string": {
"version": "3.3.5",
"resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.3.5.tgz",
@ -5798,6 +5948,12 @@
"typedarray-to-buffer": "^3.1.5"
}
},
"xmlcreate": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.3.tgz",
"integrity": "sha512-HgS+X6zAztGa9zIK3Y3LXuJes33Lz9x+YyTxgrkIdabu2vqcGOWwdfCpf1hWLRrd553wd4QCDf6BBO6FfdsRiQ==",
"dev": true
},
"xtend": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",

View file

@ -1,8 +1,8 @@
{
"private": true,
"scripts": {
"test": "grunt test",
"doc": "jsduck"
"doc": "jsdoc -c jsdoc.json",
"test": "grunt test"
},
"devDependencies": {
"eslint-config-wikimedia": "0.17.0",
@ -11,6 +11,7 @@
"grunt-contrib-watch": "1.1.0",
"grunt-eslint": "23.0.0",
"grunt-stylelint": "0.16.0",
"jsdoc": "3.6.6",
"stylelint-config-wikimedia": "0.10.3"
}
}