Build/Test Tools: Enable JSDocs to be linted with ESLint.
As part of the [Javascript Inline Docs Initiative](https://make.wordpress.org/core/handbook/docs/inline/js/) this add some tooling to lint Javascript docblocks. Two new commands: * `npm run lint:jsdoc` * `npm run lint:jsdoc:fix` The latter will run the linter and try to fix an possible issues automatically. Fixes #43828. Props netweb, atimmer, kamataryo, whyisjake. Built from https://develop.svn.wordpress.org/trunk@48650 git-svn-id: http://core.svn.wordpress.org/trunk@48412 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -294,8 +294,8 @@
|
||||
* @since 5.3.1
|
||||
*
|
||||
* @param {HTMLElement} element The HTML element.
|
||||
* @param {String} className The class name.
|
||||
* @return {bool} Whether the element has the className.
|
||||
* @param {string} className The class name.
|
||||
* @return {boolean} Whether the element has the className.
|
||||
*/
|
||||
function hasClass( element, className ) {
|
||||
var classNames;
|
||||
@@ -320,7 +320,7 @@
|
||||
* @since 5.3.1
|
||||
*
|
||||
* @param {HTMLElement} element The HTML element.
|
||||
* @param {String} className The class name.
|
||||
* @param {string} className The class name.
|
||||
*/
|
||||
function addClass( element, className ) {
|
||||
if ( ! element ) {
|
||||
@@ -344,7 +344,7 @@
|
||||
* @since 5.3.1
|
||||
*
|
||||
* @param {HTMLElement} element The HTML element.
|
||||
* @param {String} className The class name.
|
||||
* @param {string} className The class name.
|
||||
*/
|
||||
function removeClass( element, className ) {
|
||||
var testName,
|
||||
|
||||
Reference in New Issue
Block a user