From 894fed3e80b202c28ac9dbe7bd4cd6d75b393102 Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Tue, 16 Apr 2019 08:58:40 +0800 Subject: [PATCH] - Linting (JSDoc): Update per newly enforced `require-returns`; avoid Closure syntax - Docs (JSDoc): Prefer `void` - npm: Update devDeps --- CHANGES.md | 3 +- editor/coords.js | 1 + editor/jgraduate/jQuery.jPicker.js | 1 + editor/layer.js | 2 +- editor/path.js | 8 +-- editor/select.js | 2 +- editor/svg-editor.js | 3 + editor/svgcanvas.js | 16 ++++- package-lock.json | 95 +++++++++++++++++------------- package.json | 4 +- test/utilities_test.js | 1 + 11 files changed, 84 insertions(+), 52 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index ecb389c9..555c0f01 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,9 +5,10 @@ - Enhancement: Return a Promise for Editor's `setCustomHandlers`, `loadFromString`, `loadFromDataURI` so known when ready and set - Refactoring: Destructuring, templates, label Unicode code point +- Linting (JSDoc): Update per newly enforced `require-returns` - Docs (Refactoring): Formally specify `Promise` resolve type; add `typedef` for dialog result object; add an - `ArbitraryCallbackResult` type + `ArbitraryCallbackResult` type; prefer `void` - npm: Rename `build-doc` to `build-docs`; add `open-docs` script - npm: Update devDeps (and our @babel/polyfill copy) diff --git a/editor/coords.js b/editor/coords.js index 19965d88..34b37ee3 100644 --- a/editor/coords.js +++ b/editor/coords.js @@ -53,6 +53,7 @@ export const init = function (editorContext) { * Applies coordinate changes to an element based on the given matrix. * @function module:coords.remapElement * @implements {module:path.EditorContext#remapElement} + * @returns {void} */ export const remapElement = function (selected, changes, m) { const remap = function (x, y) { return transformPoint(x, y, m); }, diff --git a/editor/jgraduate/jQuery.jPicker.js b/editor/jgraduate/jQuery.jPicker.js index 494eb92d..c2864295 100755 --- a/editor/jgraduate/jQuery.jPicker.js +++ b/editor/jgraduate/jQuery.jPicker.js @@ -711,6 +711,7 @@ const jPicker = function ($) { * @class * @memberof external:jQuery.jPicker * @param {module:jPicker.JPickerInit} init + * @returns {external:jQuery.jPicker.Color} */ Color: function (init) { // eslint-disable-line object-shorthand const that = this; diff --git a/editor/layer.js b/editor/layer.js index 37446815..a46c0fd5 100644 --- a/editor/layer.js +++ b/editor/layer.js @@ -29,7 +29,7 @@ class Layer { * If group and no svgElem, use group for this layer. * If group and svgElem, create a new group element and insert it in the DOM after group. * If no group and svgElem, create a new group element and insert it in the DOM as the last layer. - * @param {SVGGElement=} svgElem - The SVG DOM element. If defined, use this to add + * @param {SVGGElement} [svgElem] - The SVG DOM element. If defined, use this to add * a new layer to the document. */ constructor (name, group, svgElem) { diff --git a/editor/path.js b/editor/path.js index 10b99106..bdcc04da 100644 --- a/editor/path.js +++ b/editor/path.js @@ -119,25 +119,25 @@ let editorContext_ = null; /** * @function module:path.EditorContext#clearSelection * @param {boolean} [noCall] - When `true`, does not call the "selected" handler - * @returns {undefined} + * @returns {void} */ /** * @function module:path.EditorContext#addToSelection * @param {Element[]} elemsToAdd - An array of DOM elements to add to the selection * @param {boolean} showGrips - Indicates whether the resize grips should be shown - * @returns {undefined} + * @returns {void} */ /** * @function module:path.EditorContext#addCommandToHistory * @param {Command} cmd - * @returns {undefined} + * @returns {void} */ /** * @function module:path.EditorContext#remapElement * @param {Element} selected - DOM element to be changed * @param {PlainObject.} changes - Object with changes to be remapped * @param {SVGMatrix} m - Matrix object to use for remapping coordinates - * @returns {undefined} + * @returns {void} */ /** * @function module:path.EditorContext#addSVGElementFromJson diff --git a/editor/select.js b/editor/select.js index 6014925f..c2779a3f 100644 --- a/editor/select.js +++ b/editor/select.js @@ -511,7 +511,7 @@ export class SelectorManager { */ /** * @function module:select.SVGFactory#getCurrentZoom - * @returns {Float} + * @returns {Float} The current zoom level */ /** diff --git a/editor/svg-editor.js b/editor/svg-editor.js index 935133da..5ffd7eb7 100644 --- a/editor/svg-editor.js +++ b/editor/svg-editor.js @@ -1168,6 +1168,7 @@ editor.init = function () { /** * Setup SVG icons + * @returns {void} */ function setIcons () { $.svgIcons(curConfig.imgPath + 'svg_edit_icons.svg', { @@ -5446,6 +5447,7 @@ editor.init = function () { /** * @implements {module:jQuerySpinButton.StepCallback} + * @returns {Float} */ function stepFontSize (elem, step) { const origVal = Number(elem.value); @@ -5470,6 +5472,7 @@ editor.init = function () { /** * @implements {module:jQuerySpinButton.StepCallback} + * @returns {Float} */ function stepZoom (elem, step) { const origVal = Number(elem.value); diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index c3a92d8c..b2b45705 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -228,6 +228,7 @@ canvas.current_drawing_ = new draw.Drawing(svgcontent, idprefix); * Returns the current Drawing. * @function module:svgcanvas.SvgCanvas#getCurrentDrawing * @implements {module:draw.DrawCanvasInit#getCurrentDrawing} +* @returns {module:draw.Drawing} */ const getCurrentDrawing = canvas.getCurrentDrawing = function () { return canvas.current_drawing_; @@ -314,6 +315,7 @@ const getJsonFromSvgElement = this.getJsonFromSvgElement = function (data) { * This should really be an intersection implementing all rather than a union. * @function module:svgcanvas.SvgCanvas#addSVGElementFromJson * @implements {module:utilities.EditorContext#addSVGElementFromJson|module:path.EditorContext#addSVGElementFromJson} +* @returns {Element} The new element */ const addSVGElementFromJson = this.addSVGElementFromJson = function (data) { if (typeof data === 'string') return svgdoc.createTextNode(data); @@ -367,6 +369,7 @@ canvas.transformListToTransform = transformListToTransform; /** * @implements {module:utilities.EditorContext#getBaseUnit} +* @returns {string} */ const getBaseUnit = () => { return curConfig.baseUnit; }; @@ -392,6 +395,7 @@ canvas.convertToNum = convertToNum; /** * This should really be an intersection implementing all rather than a union. * @implements {module:draw.DrawCanvasInit#getSVGContent|module:utilities.EditorContext#getSVGContent} +* @returns {SVGSVGElement} */ const getSVGContent = () => { return svgcontent; }; @@ -399,6 +403,7 @@ const getSVGContent = () => { return svgcontent; }; * Should really be an intersection with all needing to apply rather than a union. * @function module:svgcanvas.SvgCanvas#getSelectedElements * @implements {module:utilities.EditorContext#getSelectedElements|module:draw.DrawCanvasInit#getSelectedElements|module:path.EditorContext#getSelectedElements} +* @returns {Element[]} the array with selected DOM elements */ const getSelectedElements = this.getSelectedElems = function () { return selectedElements; @@ -409,6 +414,7 @@ const {pathActions} = pathModule; /** * This should actually be an intersection as all interfaces should be met. * @implements {module:utilities.EditorContext#getSVGRoot|module:recalculate.EditorContext#getSVGRoot|module:coords.EditorContext#getSVGRoot|module:path.EditorContext#getSVGRoot} +* @returns {SVGSVGElement} */ const getSVGRoot = () => svgroot; @@ -444,7 +450,8 @@ this.cleanupElement = cleanupElement; /** * This should actually be an intersection not a union as all should apply. -* @implements {module:coords.EditorContext|module:path.EditorContext} +* @implements {module:coords.EditorContext#getGridSnapping|module:path.EditorContext#getGridSnapping} +* @returns {boolean} */ const getGridSnapping = () => { return curConfig.gridSnapping; }; @@ -561,6 +568,7 @@ const addCommandToHistory = function (cmd) { * This should really be an intersection applying to all types rather than a union. * @function module:svgcanvas.SvgCanvas#getZoom * @implements {module:path.EditorContext#getCurrentZoom|module:select.SVGFactory#getCurrentZoom} +* @returns {Float} The current zoom level */ const getCurrentZoom = this.getZoom = function () { return currentZoom; }; @@ -568,6 +576,7 @@ const getCurrentZoom = this.getZoom = function () { return currentZoom; }; * This method rounds the incoming value to the nearest value based on the `currentZoom` * @function module:svgcanvas.SvgCanvas#round * @implements {module:path.EditorContext#round} +* @returns {Float} Rounded value to nearest value based on `currentZoom` */ const round = this.round = function (val) { return parseInt(val * currentZoom) / currentZoom; @@ -596,6 +605,7 @@ const selectorManager = this.selectorManager = getSelectorManager(); /** * @function module:svgcanvas.SvgCanvas#getNextId * @implements {module:path.EditorContext#getNextId} +* @returns {string} */ const getNextId = canvas.getNextId = function () { return getCurrentDrawing().getNextId(); @@ -604,6 +614,7 @@ const getNextId = canvas.getNextId = function () { /** * @function module:svgcanvas.SvgCanvas#getId * @implements {module:path.EditorContext#getId} +* @returns {string} */ const getId = canvas.getId = function () { return getCurrentDrawing().getId(); @@ -648,6 +659,7 @@ const clearSelection = this.clearSelection = function (noCall) { * @function module:svgcanvas.SvgCanvas#addToSelection * @implements {module:path.EditorContext#addToSelection} * @fires module:svgcanvas.SvgCanvas#event:selected +* @returns {void} */ const addToSelection = this.addToSelection = function (elemsToAdd, showGrips) { if (!elemsToAdd.length) { return; } @@ -717,6 +729,7 @@ const addToSelection = this.addToSelection = function (elemsToAdd, showGrips) { /** * @implements {module:path.EditorContext#getOpacity} +* @returns {Float} */ const getOpacity = function () { return curShape.opacity; @@ -725,6 +738,7 @@ const getOpacity = function () { /** * @function module:svgcanvas.SvgCanvas#getMouseTarget * @implements {module:path.EditorContext#getMouseTarget} +* @returns {Element} DOM element we want */ const getMouseTarget = this.getMouseTarget = function (evt) { if (isNullish(evt)) { diff --git a/package-lock.json b/package-lock.json index ab3f0584..261b1735 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1599,6 +1599,16 @@ "integrity": "sha1-z+nYwmYoudxa7MYqn12PHzUsEZU=", "dev": true }, + "array-includes": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.0.3.tgz", + "integrity": "sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0=", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "es-abstract": "^1.7.0" + } + }, "array-slice": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz", @@ -1684,7 +1694,7 @@ }, "async": { "version": "0.2.6", - "resolved": "https://registry.npmjs.org/async/-/async-0.2.6.tgz", + "resolved": "http://registry.npmjs.org/async/-/async-0.2.6.tgz", "integrity": "sha1-rT83PZJJrjJIgVZVgryQ4VKrvWg=", "dev": true }, @@ -1770,7 +1780,7 @@ }, "chalk": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { @@ -1789,7 +1799,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { @@ -1848,7 +1858,7 @@ }, "json5": { "version": "0.5.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "resolved": "http://registry.npmjs.org/json5/-/json5-0.5.1.tgz", "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", "dev": true }, @@ -2096,43 +2106,43 @@ }, "babel-plugin-syntax-async-functions": { "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz", + "resolved": "http://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz", "integrity": "sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU=", "dev": true }, "babel-plugin-syntax-async-generators": { "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz", + "resolved": "http://registry.npmjs.org/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz", "integrity": "sha1-a8lj67FuzLrmuStZbrfzXDQqi5o=", "dev": true }, "babel-plugin-syntax-class-properties": { "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz", + "resolved": "http://registry.npmjs.org/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz", "integrity": "sha1-1+sjt5oxf4VDlixQW4J8fWysJ94=", "dev": true }, "babel-plugin-syntax-decorators": { "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-decorators/-/babel-plugin-syntax-decorators-6.13.0.tgz", + "resolved": "http://registry.npmjs.org/babel-plugin-syntax-decorators/-/babel-plugin-syntax-decorators-6.13.0.tgz", "integrity": "sha1-MSVjtNvePMgGzuPkFszurd0RrAs=", "dev": true }, "babel-plugin-syntax-dynamic-import": { "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz", + "resolved": "http://registry.npmjs.org/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz", "integrity": "sha1-jWomIpyDdFqZgqRBBRVyyqF5sdo=", "dev": true }, "babel-plugin-syntax-exponentiation-operator": { "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz", + "resolved": "http://registry.npmjs.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz", "integrity": "sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4=", "dev": true }, "babel-plugin-syntax-flow": { "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz", + "resolved": "http://registry.npmjs.org/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz", "integrity": "sha1-TDqyCiryaqIM0lmVw5jE63AxDI0=", "dev": true }, @@ -2448,7 +2458,7 @@ }, "regjsgen": { "version": "0.2.0", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", + "resolved": "http://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=", "dev": true }, @@ -2626,7 +2636,7 @@ "dependencies": { "babel-plugin-syntax-object-rest-spread": { "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz", + "resolved": "http://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz", "integrity": "sha1-/WU28rzhODb/o6VFjEkDpZe7O/U=", "dev": true }, @@ -2932,7 +2942,7 @@ }, "bowser": { "version": "1.6.0", - "resolved": "https://registry.npmjs.org/bowser/-/bowser-1.6.0.tgz", + "resolved": "http://registry.npmjs.org/bowser/-/bowser-1.6.0.tgz", "integrity": "sha1-N/w4e2Fstq7zcNq01r1AK3TFxU0=", "dev": true }, @@ -4234,9 +4244,9 @@ } }, "eslint-config-ash-nazg": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/eslint-config-ash-nazg/-/eslint-config-ash-nazg-1.0.2.tgz", - "integrity": "sha512-K9RRj6+Kt07KA8q4eUq37DrETvpV/H6DsTDk4xsd0a+S+D/PN93PTWzgOKXJ7oz+S5b1/n6mVhFxgsGfdQxqUA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-ash-nazg/-/eslint-config-ash-nazg-2.0.0.tgz", + "integrity": "sha512-abO6AI+R4q5HWRmnyAk/nOYofC3+UVlGD5hJHX4chzkBIBf4IkYgud7vQ5xlNX1qXO9QFUu+ipnofugTkntulA==", "dev": true }, "eslint-config-standard": { @@ -4273,9 +4283,9 @@ } }, "eslint-module-utils": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.3.0.tgz", - "integrity": "sha512-lmDJgeOOjk8hObTysjqH7wyMi+nsHwwvfBykwfhjR1LNdd7C2uFJBvx4OpWYpXOw4df1yE1cDEVd1yLHitk34w==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.4.0.tgz", + "integrity": "sha512-14tltLm38Eu3zS+mt0KvILC3q8jyIAH518MlG+HO0p+yK885Lb1UHTY/UgR91eOyGdmxAPb+OLoW4znqIT6Ndw==", "dev": true, "requires": { "debug": "^2.6.8", @@ -4348,21 +4358,22 @@ "dev": true }, "eslint-plugin-import": { - "version": "2.16.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.16.0.tgz", - "integrity": "sha512-z6oqWlf1x5GkHIFgrSvtmudnqM6Q60KM4KvpWi5ubonMjycLjndvd5+8VAZIsTlHC03djdgJuyKG6XO577px6A==", + "version": "2.17.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.17.1.tgz", + "integrity": "sha512-lzD9uvRvW4MsHzIOMJEDSb5MOV9LzgxRPBaovvOhJqzgxRHYfGy9QOrMuwHIh5ehKFJ7Z3DcrcGKDQ0IbP0EdQ==", "dev": true, "requires": { + "array-includes": "^3.0.3", "contains-path": "^0.1.0", "debug": "^2.6.9", "doctrine": "1.5.0", "eslint-import-resolver-node": "^0.3.2", - "eslint-module-utils": "^2.3.0", + "eslint-module-utils": "^2.4.0", "has": "^1.0.3", "lodash": "^4.17.11", "minimatch": "^3.0.4", "read-pkg-up": "^2.0.0", - "resolve": "^1.9.0" + "resolve": "^1.10.0" }, "dependencies": { "debug": { @@ -7224,7 +7235,7 @@ }, "load-json-file": { "version": "2.0.0", - "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, "requires": { @@ -8432,7 +8443,7 @@ }, "kind-of": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", + "resolved": "http://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=", "dev": true } @@ -10158,7 +10169,7 @@ }, "chalk": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { @@ -10239,7 +10250,7 @@ }, "minimist": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, @@ -10283,7 +10294,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { @@ -10337,7 +10348,7 @@ "dependencies": { "babel-runtime": { "version": "5.8.38", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-5.8.38.tgz", + "resolved": "http://registry.npmjs.org/babel-runtime/-/babel-runtime-5.8.38.tgz", "integrity": "sha1-HAsC62MxL18If/IEUIJ7QlydTBk=", "dev": true, "requires": { @@ -10346,7 +10357,7 @@ }, "core-js": { "version": "1.2.7", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", + "resolved": "http://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=", "dev": true } @@ -10385,7 +10396,7 @@ "dependencies": { "iconv-lite": { "version": "0.4.11", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.11.tgz", + "resolved": "http://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.11.tgz", "integrity": "sha1-LstC/SlHRJIiCaLnxATayHk9it4=", "dev": true }, @@ -10459,7 +10470,7 @@ "dependencies": { "babel-runtime": { "version": "5.8.38", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-5.8.38.tgz", + "resolved": "http://registry.npmjs.org/babel-runtime/-/babel-runtime-5.8.38.tgz", "integrity": "sha1-HAsC62MxL18If/IEUIJ7QlydTBk=", "dev": true, "requires": { @@ -10468,7 +10479,7 @@ }, "core-js": { "version": "1.2.7", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", + "resolved": "http://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=", "dev": true }, @@ -10497,31 +10508,31 @@ }, "testcafe-reporter-json": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/testcafe-reporter-json/-/testcafe-reporter-json-2.1.0.tgz", + "resolved": "http://registry.npmjs.org/testcafe-reporter-json/-/testcafe-reporter-json-2.1.0.tgz", "integrity": "sha1-gLm1pt/y7h3h+R4mcHBsFHLmQAY=", "dev": true }, "testcafe-reporter-list": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/testcafe-reporter-list/-/testcafe-reporter-list-2.1.0.tgz", + "resolved": "http://registry.npmjs.org/testcafe-reporter-list/-/testcafe-reporter-list-2.1.0.tgz", "integrity": "sha1-n6ifcbl9Pf5ktDAtXiJ97mmuxrk=", "dev": true }, "testcafe-reporter-minimal": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/testcafe-reporter-minimal/-/testcafe-reporter-minimal-2.1.0.tgz", + "resolved": "http://registry.npmjs.org/testcafe-reporter-minimal/-/testcafe-reporter-minimal-2.1.0.tgz", "integrity": "sha1-Z28DVHY0FDxurzq1KGgnOkvr9CE=", "dev": true }, "testcafe-reporter-spec": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/testcafe-reporter-spec/-/testcafe-reporter-spec-2.1.1.tgz", + "resolved": "http://registry.npmjs.org/testcafe-reporter-spec/-/testcafe-reporter-spec-2.1.1.tgz", "integrity": "sha1-gVb87Q9RMkhlWa1WC8gGdkaSdew=", "dev": true }, "testcafe-reporter-xunit": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/testcafe-reporter-xunit/-/testcafe-reporter-xunit-2.1.0.tgz", + "resolved": "http://registry.npmjs.org/testcafe-reporter-xunit/-/testcafe-reporter-xunit-2.1.0.tgz", "integrity": "sha1-5tZsVyzhWvJmcGrw/WELKoQd1EM=", "dev": true }, @@ -11385,7 +11396,7 @@ }, "wrap-ansi": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "resolved": "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "dev": true, "requires": { @@ -11421,7 +11432,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { diff --git a/package.json b/package.json index e440e796..b017dc7d 100644 --- a/package.json +++ b/package.json @@ -86,11 +86,11 @@ "axe-testcafe": "^1.1.0", "babel-plugin-transform-object-rest-spread": "^7.0.0-beta.3", "eslint": "5.16.0", - "eslint-config-ash-nazg": "1.0.2", + "eslint-config-ash-nazg": "2.0.0", "eslint-config-standard": "12.0.0", "eslint-plugin-compat": "^3.1.1", "eslint-plugin-eslint-comments": "^3.1.1", - "eslint-plugin-import": "2.16.0", + "eslint-plugin-import": "2.17.1", "eslint-plugin-jsdoc": "^4.8.3", "eslint-plugin-markdown": "^1.0.0", "eslint-plugin-no-use-extend-native": "^0.4.0", diff --git a/test/utilities_test.js b/test/utilities_test.js index c70b0935..9c99e5b2 100644 --- a/test/utilities_test.js +++ b/test/utilities_test.js @@ -291,6 +291,7 @@ QUnit.test('Test getBBoxOfElementAsPath', function (assert) { /** * Wrap `utilities.getBBoxOfElementAsPath` to convert bbox to object for testing. * @implements {module:utilities.getBBoxOfElementAsPath} + * @returns {DOMRect|false} The resulting path's bounding box object. */ function getBBoxOfElementAsPath (elem, addSVGElementFromJson, pathActions) { const bbox = utilities.getBBoxOfElementAsPath(elem, addSVGElementFromJson, pathActions);