- Linting (JSDoc): Update per newly enforced `require-returns`; avoid Closure syntax

- Docs (JSDoc): Prefer `void`
- npm: Update devDeps
master
Brett Zamir 2019-04-16 08:58:40 +08:00
parent 7ca6b458e6
commit 894fed3e80
11 changed files with 84 additions and 52 deletions

View File

@ -5,9 +5,10 @@
- Enhancement: Return a Promise for Editor's `setCustomHandlers`, - Enhancement: Return a Promise for Editor's `setCustomHandlers`,
`loadFromString`, `loadFromDataURI` so known when ready and set `loadFromString`, `loadFromDataURI` so known when ready and set
- Refactoring: Destructuring, templates, label Unicode code point - Refactoring: Destructuring, templates, label Unicode code point
- Linting (JSDoc): Update per newly enforced `require-returns`
- Docs (Refactoring): Formally specify `Promise` resolve type; - Docs (Refactoring): Formally specify `Promise` resolve type;
add `typedef` for dialog result object; add an 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: Rename `build-doc` to `build-docs`; add `open-docs` script
- npm: Update devDeps (and our @babel/polyfill copy) - npm: Update devDeps (and our @babel/polyfill copy)

View File

@ -53,6 +53,7 @@ export const init = function (editorContext) {
* Applies coordinate changes to an element based on the given matrix. * Applies coordinate changes to an element based on the given matrix.
* @function module:coords.remapElement * @function module:coords.remapElement
* @implements {module:path.EditorContext#remapElement} * @implements {module:path.EditorContext#remapElement}
* @returns {void}
*/ */
export const remapElement = function (selected, changes, m) { export const remapElement = function (selected, changes, m) {
const remap = function (x, y) { return transformPoint(x, y, m); }, const remap = function (x, y) { return transformPoint(x, y, m); },

View File

@ -711,6 +711,7 @@ const jPicker = function ($) {
* @class * @class
* @memberof external:jQuery.jPicker * @memberof external:jQuery.jPicker
* @param {module:jPicker.JPickerInit} init * @param {module:jPicker.JPickerInit} init
* @returns {external:jQuery.jPicker.Color}
*/ */
Color: function (init) { // eslint-disable-line object-shorthand Color: function (init) { // eslint-disable-line object-shorthand
const that = this; const that = this;

View File

@ -29,7 +29,7 @@ class Layer {
* If group and no svgElem, use group for this 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 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. * 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. * a new layer to the document.
*/ */
constructor (name, group, svgElem) { constructor (name, group, svgElem) {

View File

@ -119,25 +119,25 @@ let editorContext_ = null;
/** /**
* @function module:path.EditorContext#clearSelection * @function module:path.EditorContext#clearSelection
* @param {boolean} [noCall] - When `true`, does not call the "selected" handler * @param {boolean} [noCall] - When `true`, does not call the "selected" handler
* @returns {undefined} * @returns {void}
*/ */
/** /**
* @function module:path.EditorContext#addToSelection * @function module:path.EditorContext#addToSelection
* @param {Element[]} elemsToAdd - An array of DOM elements to add to the selection * @param {Element[]} elemsToAdd - An array of DOM elements to add to the selection
* @param {boolean} showGrips - Indicates whether the resize grips should be shown * @param {boolean} showGrips - Indicates whether the resize grips should be shown
* @returns {undefined} * @returns {void}
*/ */
/** /**
* @function module:path.EditorContext#addCommandToHistory * @function module:path.EditorContext#addCommandToHistory
* @param {Command} cmd * @param {Command} cmd
* @returns {undefined} * @returns {void}
*/ */
/** /**
* @function module:path.EditorContext#remapElement * @function module:path.EditorContext#remapElement
* @param {Element} selected - DOM element to be changed * @param {Element} selected - DOM element to be changed
* @param {PlainObject.<string, string>} changes - Object with changes to be remapped * @param {PlainObject.<string, string>} changes - Object with changes to be remapped
* @param {SVGMatrix} m - Matrix object to use for remapping coordinates * @param {SVGMatrix} m - Matrix object to use for remapping coordinates
* @returns {undefined} * @returns {void}
*/ */
/** /**
* @function module:path.EditorContext#addSVGElementFromJson * @function module:path.EditorContext#addSVGElementFromJson

View File

@ -511,7 +511,7 @@ export class SelectorManager {
*/ */
/** /**
* @function module:select.SVGFactory#getCurrentZoom * @function module:select.SVGFactory#getCurrentZoom
* @returns {Float} * @returns {Float} The current zoom level
*/ */
/** /**

View File

@ -1168,6 +1168,7 @@ editor.init = function () {
/** /**
* Setup SVG icons * Setup SVG icons
* @returns {void}
*/ */
function setIcons () { function setIcons () {
$.svgIcons(curConfig.imgPath + 'svg_edit_icons.svg', { $.svgIcons(curConfig.imgPath + 'svg_edit_icons.svg', {
@ -5446,6 +5447,7 @@ editor.init = function () {
/** /**
* @implements {module:jQuerySpinButton.StepCallback} * @implements {module:jQuerySpinButton.StepCallback}
* @returns {Float}
*/ */
function stepFontSize (elem, step) { function stepFontSize (elem, step) {
const origVal = Number(elem.value); const origVal = Number(elem.value);
@ -5470,6 +5472,7 @@ editor.init = function () {
/** /**
* @implements {module:jQuerySpinButton.StepCallback} * @implements {module:jQuerySpinButton.StepCallback}
* @returns {Float}
*/ */
function stepZoom (elem, step) { function stepZoom (elem, step) {
const origVal = Number(elem.value); const origVal = Number(elem.value);

View File

@ -228,6 +228,7 @@ canvas.current_drawing_ = new draw.Drawing(svgcontent, idprefix);
* Returns the current Drawing. * Returns the current Drawing.
* @function module:svgcanvas.SvgCanvas#getCurrentDrawing * @function module:svgcanvas.SvgCanvas#getCurrentDrawing
* @implements {module:draw.DrawCanvasInit#getCurrentDrawing} * @implements {module:draw.DrawCanvasInit#getCurrentDrawing}
* @returns {module:draw.Drawing}
*/ */
const getCurrentDrawing = canvas.getCurrentDrawing = function () { const getCurrentDrawing = canvas.getCurrentDrawing = function () {
return canvas.current_drawing_; 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. * This should really be an intersection implementing all rather than a union.
* @function module:svgcanvas.SvgCanvas#addSVGElementFromJson * @function module:svgcanvas.SvgCanvas#addSVGElementFromJson
* @implements {module:utilities.EditorContext#addSVGElementFromJson|module:path.EditorContext#addSVGElementFromJson} * @implements {module:utilities.EditorContext#addSVGElementFromJson|module:path.EditorContext#addSVGElementFromJson}
* @returns {Element} The new element
*/ */
const addSVGElementFromJson = this.addSVGElementFromJson = function (data) { const addSVGElementFromJson = this.addSVGElementFromJson = function (data) {
if (typeof data === 'string') return svgdoc.createTextNode(data); if (typeof data === 'string') return svgdoc.createTextNode(data);
@ -367,6 +369,7 @@ canvas.transformListToTransform = transformListToTransform;
/** /**
* @implements {module:utilities.EditorContext#getBaseUnit} * @implements {module:utilities.EditorContext#getBaseUnit}
* @returns {string}
*/ */
const getBaseUnit = () => { return curConfig.baseUnit; }; const getBaseUnit = () => { return curConfig.baseUnit; };
@ -392,6 +395,7 @@ canvas.convertToNum = convertToNum;
/** /**
* This should really be an intersection implementing all rather than a union. * This should really be an intersection implementing all rather than a union.
* @implements {module:draw.DrawCanvasInit#getSVGContent|module:utilities.EditorContext#getSVGContent} * @implements {module:draw.DrawCanvasInit#getSVGContent|module:utilities.EditorContext#getSVGContent}
* @returns {SVGSVGElement}
*/ */
const getSVGContent = () => { return svgcontent; }; 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. * Should really be an intersection with all needing to apply rather than a union.
* @function module:svgcanvas.SvgCanvas#getSelectedElements * @function module:svgcanvas.SvgCanvas#getSelectedElements
* @implements {module:utilities.EditorContext#getSelectedElements|module:draw.DrawCanvasInit#getSelectedElements|module:path.EditorContext#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 () { const getSelectedElements = this.getSelectedElems = function () {
return selectedElements; return selectedElements;
@ -409,6 +414,7 @@ const {pathActions} = pathModule;
/** /**
* This should actually be an intersection as all interfaces should be met. * 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} * @implements {module:utilities.EditorContext#getSVGRoot|module:recalculate.EditorContext#getSVGRoot|module:coords.EditorContext#getSVGRoot|module:path.EditorContext#getSVGRoot}
* @returns {SVGSVGElement}
*/ */
const getSVGRoot = () => svgroot; const getSVGRoot = () => svgroot;
@ -444,7 +450,8 @@ this.cleanupElement = cleanupElement;
/** /**
* This should actually be an intersection not a union as all should apply. * 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; }; 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. * This should really be an intersection applying to all types rather than a union.
* @function module:svgcanvas.SvgCanvas#getZoom * @function module:svgcanvas.SvgCanvas#getZoom
* @implements {module:path.EditorContext#getCurrentZoom|module:select.SVGFactory#getCurrentZoom} * @implements {module:path.EditorContext#getCurrentZoom|module:select.SVGFactory#getCurrentZoom}
* @returns {Float} The current zoom level
*/ */
const getCurrentZoom = this.getZoom = function () { return currentZoom; }; 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` * This method rounds the incoming value to the nearest value based on the `currentZoom`
* @function module:svgcanvas.SvgCanvas#round * @function module:svgcanvas.SvgCanvas#round
* @implements {module:path.EditorContext#round} * @implements {module:path.EditorContext#round}
* @returns {Float} Rounded value to nearest value based on `currentZoom`
*/ */
const round = this.round = function (val) { const round = this.round = function (val) {
return parseInt(val * currentZoom) / currentZoom; return parseInt(val * currentZoom) / currentZoom;
@ -596,6 +605,7 @@ const selectorManager = this.selectorManager = getSelectorManager();
/** /**
* @function module:svgcanvas.SvgCanvas#getNextId * @function module:svgcanvas.SvgCanvas#getNextId
* @implements {module:path.EditorContext#getNextId} * @implements {module:path.EditorContext#getNextId}
* @returns {string}
*/ */
const getNextId = canvas.getNextId = function () { const getNextId = canvas.getNextId = function () {
return getCurrentDrawing().getNextId(); return getCurrentDrawing().getNextId();
@ -604,6 +614,7 @@ const getNextId = canvas.getNextId = function () {
/** /**
* @function module:svgcanvas.SvgCanvas#getId * @function module:svgcanvas.SvgCanvas#getId
* @implements {module:path.EditorContext#getId} * @implements {module:path.EditorContext#getId}
* @returns {string}
*/ */
const getId = canvas.getId = function () { const getId = canvas.getId = function () {
return getCurrentDrawing().getId(); return getCurrentDrawing().getId();
@ -648,6 +659,7 @@ const clearSelection = this.clearSelection = function (noCall) {
* @function module:svgcanvas.SvgCanvas#addToSelection * @function module:svgcanvas.SvgCanvas#addToSelection
* @implements {module:path.EditorContext#addToSelection} * @implements {module:path.EditorContext#addToSelection}
* @fires module:svgcanvas.SvgCanvas#event:selected * @fires module:svgcanvas.SvgCanvas#event:selected
* @returns {void}
*/ */
const addToSelection = this.addToSelection = function (elemsToAdd, showGrips) { const addToSelection = this.addToSelection = function (elemsToAdd, showGrips) {
if (!elemsToAdd.length) { return; } if (!elemsToAdd.length) { return; }
@ -717,6 +729,7 @@ const addToSelection = this.addToSelection = function (elemsToAdd, showGrips) {
/** /**
* @implements {module:path.EditorContext#getOpacity} * @implements {module:path.EditorContext#getOpacity}
* @returns {Float}
*/ */
const getOpacity = function () { const getOpacity = function () {
return curShape.opacity; return curShape.opacity;
@ -725,6 +738,7 @@ const getOpacity = function () {
/** /**
* @function module:svgcanvas.SvgCanvas#getMouseTarget * @function module:svgcanvas.SvgCanvas#getMouseTarget
* @implements {module:path.EditorContext#getMouseTarget} * @implements {module:path.EditorContext#getMouseTarget}
* @returns {Element} DOM element we want
*/ */
const getMouseTarget = this.getMouseTarget = function (evt) { const getMouseTarget = this.getMouseTarget = function (evt) {
if (isNullish(evt)) { if (isNullish(evt)) {

95
package-lock.json generated
View File

@ -1599,6 +1599,16 @@
"integrity": "sha1-z+nYwmYoudxa7MYqn12PHzUsEZU=", "integrity": "sha1-z+nYwmYoudxa7MYqn12PHzUsEZU=",
"dev": true "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": { "array-slice": {
"version": "0.2.3", "version": "0.2.3",
"resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz", "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz",
@ -1684,7 +1694,7 @@
}, },
"async": { "async": {
"version": "0.2.6", "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=", "integrity": "sha1-rT83PZJJrjJIgVZVgryQ4VKrvWg=",
"dev": true "dev": true
}, },
@ -1770,7 +1780,7 @@
}, },
"chalk": { "chalk": {
"version": "1.1.3", "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=", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -1789,7 +1799,7 @@
}, },
"strip-ansi": { "strip-ansi": {
"version": "3.0.1", "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=", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -1848,7 +1858,7 @@
}, },
"json5": { "json5": {
"version": "0.5.1", "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=", "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=",
"dev": true "dev": true
}, },
@ -2096,43 +2106,43 @@
}, },
"babel-plugin-syntax-async-functions": { "babel-plugin-syntax-async-functions": {
"version": "6.13.0", "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=", "integrity": "sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU=",
"dev": true "dev": true
}, },
"babel-plugin-syntax-async-generators": { "babel-plugin-syntax-async-generators": {
"version": "6.13.0", "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=", "integrity": "sha1-a8lj67FuzLrmuStZbrfzXDQqi5o=",
"dev": true "dev": true
}, },
"babel-plugin-syntax-class-properties": { "babel-plugin-syntax-class-properties": {
"version": "6.13.0", "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=", "integrity": "sha1-1+sjt5oxf4VDlixQW4J8fWysJ94=",
"dev": true "dev": true
}, },
"babel-plugin-syntax-decorators": { "babel-plugin-syntax-decorators": {
"version": "6.13.0", "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=", "integrity": "sha1-MSVjtNvePMgGzuPkFszurd0RrAs=",
"dev": true "dev": true
}, },
"babel-plugin-syntax-dynamic-import": { "babel-plugin-syntax-dynamic-import": {
"version": "6.18.0", "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=", "integrity": "sha1-jWomIpyDdFqZgqRBBRVyyqF5sdo=",
"dev": true "dev": true
}, },
"babel-plugin-syntax-exponentiation-operator": { "babel-plugin-syntax-exponentiation-operator": {
"version": "6.13.0", "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=", "integrity": "sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4=",
"dev": true "dev": true
}, },
"babel-plugin-syntax-flow": { "babel-plugin-syntax-flow": {
"version": "6.18.0", "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=", "integrity": "sha1-TDqyCiryaqIM0lmVw5jE63AxDI0=",
"dev": true "dev": true
}, },
@ -2448,7 +2458,7 @@
}, },
"regjsgen": { "regjsgen": {
"version": "0.2.0", "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=", "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=",
"dev": true "dev": true
}, },
@ -2626,7 +2636,7 @@
"dependencies": { "dependencies": {
"babel-plugin-syntax-object-rest-spread": { "babel-plugin-syntax-object-rest-spread": {
"version": "6.13.0", "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=", "integrity": "sha1-/WU28rzhODb/o6VFjEkDpZe7O/U=",
"dev": true "dev": true
}, },
@ -2932,7 +2942,7 @@
}, },
"bowser": { "bowser": {
"version": "1.6.0", "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=", "integrity": "sha1-N/w4e2Fstq7zcNq01r1AK3TFxU0=",
"dev": true "dev": true
}, },
@ -4234,9 +4244,9 @@
} }
}, },
"eslint-config-ash-nazg": { "eslint-config-ash-nazg": {
"version": "1.0.2", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/eslint-config-ash-nazg/-/eslint-config-ash-nazg-1.0.2.tgz", "resolved": "https://registry.npmjs.org/eslint-config-ash-nazg/-/eslint-config-ash-nazg-2.0.0.tgz",
"integrity": "sha512-K9RRj6+Kt07KA8q4eUq37DrETvpV/H6DsTDk4xsd0a+S+D/PN93PTWzgOKXJ7oz+S5b1/n6mVhFxgsGfdQxqUA==", "integrity": "sha512-abO6AI+R4q5HWRmnyAk/nOYofC3+UVlGD5hJHX4chzkBIBf4IkYgud7vQ5xlNX1qXO9QFUu+ipnofugTkntulA==",
"dev": true "dev": true
}, },
"eslint-config-standard": { "eslint-config-standard": {
@ -4273,9 +4283,9 @@
} }
}, },
"eslint-module-utils": { "eslint-module-utils": {
"version": "2.3.0", "version": "2.4.0",
"resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.3.0.tgz", "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.4.0.tgz",
"integrity": "sha512-lmDJgeOOjk8hObTysjqH7wyMi+nsHwwvfBykwfhjR1LNdd7C2uFJBvx4OpWYpXOw4df1yE1cDEVd1yLHitk34w==", "integrity": "sha512-14tltLm38Eu3zS+mt0KvILC3q8jyIAH518MlG+HO0p+yK885Lb1UHTY/UgR91eOyGdmxAPb+OLoW4znqIT6Ndw==",
"dev": true, "dev": true,
"requires": { "requires": {
"debug": "^2.6.8", "debug": "^2.6.8",
@ -4348,21 +4358,22 @@
"dev": true "dev": true
}, },
"eslint-plugin-import": { "eslint-plugin-import": {
"version": "2.16.0", "version": "2.17.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.16.0.tgz", "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.17.1.tgz",
"integrity": "sha512-z6oqWlf1x5GkHIFgrSvtmudnqM6Q60KM4KvpWi5ubonMjycLjndvd5+8VAZIsTlHC03djdgJuyKG6XO577px6A==", "integrity": "sha512-lzD9uvRvW4MsHzIOMJEDSb5MOV9LzgxRPBaovvOhJqzgxRHYfGy9QOrMuwHIh5ehKFJ7Z3DcrcGKDQ0IbP0EdQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"array-includes": "^3.0.3",
"contains-path": "^0.1.0", "contains-path": "^0.1.0",
"debug": "^2.6.9", "debug": "^2.6.9",
"doctrine": "1.5.0", "doctrine": "1.5.0",
"eslint-import-resolver-node": "^0.3.2", "eslint-import-resolver-node": "^0.3.2",
"eslint-module-utils": "^2.3.0", "eslint-module-utils": "^2.4.0",
"has": "^1.0.3", "has": "^1.0.3",
"lodash": "^4.17.11", "lodash": "^4.17.11",
"minimatch": "^3.0.4", "minimatch": "^3.0.4",
"read-pkg-up": "^2.0.0", "read-pkg-up": "^2.0.0",
"resolve": "^1.9.0" "resolve": "^1.10.0"
}, },
"dependencies": { "dependencies": {
"debug": { "debug": {
@ -7224,7 +7235,7 @@
}, },
"load-json-file": { "load-json-file": {
"version": "2.0.0", "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=", "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -8432,7 +8443,7 @@
}, },
"kind-of": { "kind-of": {
"version": "1.1.0", "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=", "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=",
"dev": true "dev": true
} }
@ -10158,7 +10169,7 @@
}, },
"chalk": { "chalk": {
"version": "1.1.3", "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=", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -10239,7 +10250,7 @@
}, },
"minimist": { "minimist": {
"version": "1.2.0", "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=", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
"dev": true "dev": true
}, },
@ -10283,7 +10294,7 @@
}, },
"strip-ansi": { "strip-ansi": {
"version": "3.0.1", "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=", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -10337,7 +10348,7 @@
"dependencies": { "dependencies": {
"babel-runtime": { "babel-runtime": {
"version": "5.8.38", "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=", "integrity": "sha1-HAsC62MxL18If/IEUIJ7QlydTBk=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -10346,7 +10357,7 @@
}, },
"core-js": { "core-js": {
"version": "1.2.7", "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=", "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=",
"dev": true "dev": true
} }
@ -10385,7 +10396,7 @@
"dependencies": { "dependencies": {
"iconv-lite": { "iconv-lite": {
"version": "0.4.11", "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=", "integrity": "sha1-LstC/SlHRJIiCaLnxATayHk9it4=",
"dev": true "dev": true
}, },
@ -10459,7 +10470,7 @@
"dependencies": { "dependencies": {
"babel-runtime": { "babel-runtime": {
"version": "5.8.38", "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=", "integrity": "sha1-HAsC62MxL18If/IEUIJ7QlydTBk=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -10468,7 +10479,7 @@
}, },
"core-js": { "core-js": {
"version": "1.2.7", "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=", "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=",
"dev": true "dev": true
}, },
@ -10497,31 +10508,31 @@
}, },
"testcafe-reporter-json": { "testcafe-reporter-json": {
"version": "2.1.0", "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=", "integrity": "sha1-gLm1pt/y7h3h+R4mcHBsFHLmQAY=",
"dev": true "dev": true
}, },
"testcafe-reporter-list": { "testcafe-reporter-list": {
"version": "2.1.0", "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=", "integrity": "sha1-n6ifcbl9Pf5ktDAtXiJ97mmuxrk=",
"dev": true "dev": true
}, },
"testcafe-reporter-minimal": { "testcafe-reporter-minimal": {
"version": "2.1.0", "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=", "integrity": "sha1-Z28DVHY0FDxurzq1KGgnOkvr9CE=",
"dev": true "dev": true
}, },
"testcafe-reporter-spec": { "testcafe-reporter-spec": {
"version": "2.1.1", "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=", "integrity": "sha1-gVb87Q9RMkhlWa1WC8gGdkaSdew=",
"dev": true "dev": true
}, },
"testcafe-reporter-xunit": { "testcafe-reporter-xunit": {
"version": "2.1.0", "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=", "integrity": "sha1-5tZsVyzhWvJmcGrw/WELKoQd1EM=",
"dev": true "dev": true
}, },
@ -11385,7 +11396,7 @@
}, },
"wrap-ansi": { "wrap-ansi": {
"version": "2.1.0", "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=", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -11421,7 +11432,7 @@
}, },
"strip-ansi": { "strip-ansi": {
"version": "3.0.1", "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=", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"dev": true, "dev": true,
"requires": { "requires": {

View File

@ -86,11 +86,11 @@
"axe-testcafe": "^1.1.0", "axe-testcafe": "^1.1.0",
"babel-plugin-transform-object-rest-spread": "^7.0.0-beta.3", "babel-plugin-transform-object-rest-spread": "^7.0.0-beta.3",
"eslint": "5.16.0", "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-config-standard": "12.0.0",
"eslint-plugin-compat": "^3.1.1", "eslint-plugin-compat": "^3.1.1",
"eslint-plugin-eslint-comments": "^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-jsdoc": "^4.8.3",
"eslint-plugin-markdown": "^1.0.0", "eslint-plugin-markdown": "^1.0.0",
"eslint-plugin-no-use-extend-native": "^0.4.0", "eslint-plugin-no-use-extend-native": "^0.4.0",

View File

@ -291,6 +291,7 @@ QUnit.test('Test getBBoxOfElementAsPath', function (assert) {
/** /**
* Wrap `utilities.getBBoxOfElementAsPath` to convert bbox to object for testing. * Wrap `utilities.getBBoxOfElementAsPath` to convert bbox to object for testing.
* @implements {module:utilities.getBBoxOfElementAsPath} * @implements {module:utilities.getBBoxOfElementAsPath}
* @returns {DOMRect|false} The resulting path's bounding box object.
*/ */
function getBBoxOfElementAsPath (elem, addSVGElementFromJson, pathActions) { function getBBoxOfElementAsPath (elem, addSVGElementFromJson, pathActions) {
const bbox = utilities.getBBoxOfElementAsPath(elem, addSVGElementFromJson, pathActions); const bbox = utilities.getBBoxOfElementAsPath(elem, addSVGElementFromJson, pathActions);