Add 'jsdoc-wmf-theme' to jsdoc

This adds the wmf theme styles to our jsdoc as can be seen on
https://doc.wikimedia.org/Parsoid/master/.

There is a caveat with this though. jsdoc-wmf-theme adds warnings for
unlinked symbols (e.g. 'return {jQuery}') [1] which causes the jsdoc doc
generation to fail since it is set to fail on warnings (we have it
configured with `pedantic: true`).

If we add the jsdoc-wmf-theme, we will need to be stricter about our
symbol usage which could be a good thing or just be tedious and
annoying.

What do you think?

[1] https://github.com/cscott/jsdoc-wmf-theme/blob/master/publish.js#L29

Bug: T239258
Change-Id: Icade62a278d7e685cbda28a8ca26a1b703e64f19
This commit is contained in:
Nicholas Ray 2020-02-13 17:43:31 -07:00
parent a79bb8dff4
commit 7b7c948bf6
3 changed files with 26 additions and 1 deletions

View File

@ -4,7 +4,8 @@
"package": "package.json",
"pedantic": true,
"readme": "README.md",
"recurse": true
"recurse": true,
"template": "node_modules/jsdoc-wmf-theme"
},
"source": {
"include": [ "resources" ]

23
package-lock.json generated
View File

@ -4289,6 +4289,12 @@
"domelementtype": "1"
}
},
"domino": {
"version": "2.1.4",
"resolved": "https://registry.npmjs.org/domino/-/domino-2.1.4.tgz",
"integrity": "sha512-l70mlQ7IjPKC8kT7GljQXJZmt5OqFL+RE91ik5y5WWQtsd9wP8R7gpFnNu96fK5MqAAZRXfLLsnzKtkty5fWGQ==",
"dev": true
},
"domutils": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz",
@ -7699,6 +7705,17 @@
}
}
},
"jsdoc-wmf-theme": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/jsdoc-wmf-theme/-/jsdoc-wmf-theme-0.0.3.tgz",
"integrity": "sha512-jpszk0hcjY7bD1sCd8JrBdtcoudG0h9FbJTjdq8WOSEtUBNWgtIc7s1ccDoYnK/bp4OEuA7xH0xtpqe0SVutsw==",
"dev": true,
"requires": {
"domino": "^2.0.1",
"lunr": "2.3.0",
"taffydb": "^2.6.2"
}
},
"jsesc": {
"version": "2.5.2",
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz",
@ -8040,6 +8057,12 @@
"yallist": "^2.1.2"
}
},
"lunr": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.0.tgz",
"integrity": "sha1-TXwMoSvdHgRHsMExuRQgkpdAyI8=",
"dev": true
},
"make-dir": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz",

View File

@ -17,6 +17,7 @@
"grunt-eslint": "22.0.0",
"grunt-stylelint": "0.13.0",
"jsdoc": "3.6.3",
"jsdoc-wmf-theme": "0.0.3",
"less": "3.8.1",
"less-loader": "4.1.0",
"mustache": "3.0.1",