diff --git a/.eslintrc.js b/.eslintrc.js index 5b10b10a..2b378572 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -66,7 +66,10 @@ module.exports = { // environments; see also discussion above // `mocha-cleanup/no-assertions-outside-it` 'jsdoc/check-examples': ['warn', { - rejectExampleCodeRegex: '^`' + rejectExampleCodeRegex: '^`', + checkDefaults: true, + checkParams: true, + checkProperties: true }], // https://github.com/sindresorhus/eslint-plugin-unicorn/issues/453 diff --git a/badges/licenses-badge-dev.svg b/badges/licenses-badge-dev.svg index a7a34ae9..014c8f4a 100644 --- a/badges/licenses-badge-dev.svg +++ b/badges/licenses-badge-dev.svg @@ -1 +1 @@ -License typesLicense types(all devDeps)(all devDeps)PublicPublicdomaindomain1. (MIT OR CC0-1.0)1. (MIT OR CC0-1.0)2. CC0-1.02. CC0-1.03. Unlicense3. UnlicensePermissivePermissive1. (AFL-2.1 OR BSD-3-Clause)1. (AFL-2.1 OR BSD-3-Clause)2. (WTFPL OR ISC)2. (WTFPL OR ISC)3. 0BSD3. 0BSD4. Apache-2.04. Apache-2.05. BSD5. BSD6. BSD-2-Clause6. BSD-2-Clause7. BSD-3-Clause7. BSD-3-Clause8. CC-BY-3.08. CC-BY-3.09. CC-BY-4.09. CC-BY-4.010. ISC10. ISC11. MIT11. MIT12. WTFPL12. WTFPL13. Zlib13. ZlibMissingMissing1. better-assert (1.0.2)1. better-assert (1.0.2)2. callsite (1.0.0)2. callsite (1.0.0)3. component-bind (1.0.0)3. component-bind (1.0.0)4. component-inherit (0.0.3)4. component-inherit (0.0.3)5. exif-parser (0.1.12)5. exif-parser (0.1.12)6. indexof (0.0.1)6. indexof (0.0.1)7. object-component (0.0.3)7. object-component (0.0.3)8. process (0.5.2)8. process (0.5.2) \ No newline at end of file +License typesLicense types(all devDeps)(all devDeps)PublicPublicdomaindomain1. (MIT OR CC0-1.0)1. (MIT OR CC0-1.0)2. CC0-1.02. CC0-1.03. Unlicense3. UnlicensePermissivePermissive1. (AFL-2.1 OR BSD-3-Clause)1. (AFL-2.1 OR BSD-3-Clause)2. (BSD-2-Clause OR (MIT OR Apache-2.0))2. (BSD-2-Clause OR (MIT OR Apache-2.0))3. (GPL-3.0-or-later OR MIT)3. (GPL-3.0-or-later OR MIT)4. (MIT OR Apache-2.0)4. (MIT OR Apache-2.0)5. (MPL-2.0 OR Apache-2.0)5. (MPL-2.0 OR Apache-2.0)6. (WTFPL OR ISC)6. (WTFPL OR ISC)7. (WTFPL OR MIT)7. (WTFPL OR MIT)8. 0BSD8. 0BSD9. Apache-2.09. Apache-2.010. Artistic-2.010. Artistic-2.011. BSD11. BSD12. BSD-2-Clause12. BSD-2-Clause13. BSD-3-Clause13. BSD-3-Clause14. CC-BY-3.014. CC-BY-3.015. CC-BY-4.015. CC-BY-4.016. ISC16. ISC17. MIT17. MIT18. W3C-2015051318. W3C-2015051319. WTFPL19. WTFPL20. Zlib20. ZlibWeaklyWeaklyprotectiveprotective1. LGPL-3.01. LGPL-3.02. MPL-2.02. MPL-2.0UncategorizedUncategorized1. jsonify (0.0.0)1. jsonify (0.0.0)MissingMissing1. better-assert (1.0.2)1. better-assert (1.0.2)2. boundary (1.0.1)2. boundary (1.0.1)3. callsite (1.0.0)3. callsite (1.0.0)4. component-bind (1.0.0)4. component-bind (1.0.0)5. component-inherit (0.0.3)5. component-inherit (0.0.3)6. exif-parser (0.1.12)6. exif-parser (0.1.12)7. indexof (0.0.1)7. indexof (0.0.1)8. object-component (0.0.3)8. object-component (0.0.3)9. only (0.0.2)9. only (0.0.2)10. process (0.5.2)10. process (0.5.2)11. structured-source (3.0.2)11. structured-source (3.0.2)12. taffydb (2.6.2)12. taffydb (2.6.2)13. valid-url (1.0.9)13. valid-url (1.0.9) \ No newline at end of file diff --git a/badges/licenses-badge.svg b/badges/licenses-badge.svg index 5ed9448a..b93de2fe 100644 --- a/badges/licenses-badge.svg +++ b/badges/licenses-badge.svg @@ -1 +1 @@ -License typesLicense types(project, deps, and bundled devDeps)(project, deps, and bundled devDeps)PermissivePermissive1. (MIT OR Apache-2.0)1. (MIT OR Apache-2.0)2. (MPL-2.0 OR Apache-2.0)2. (MPL-2.0 OR Apache-2.0)3. Apache-2.03. Apache-2.04. ISC4. ISC5. MIT5. MIT6. MIT OR SEE LICENSE IN FEEL-FREE.md6. MIT OR SEE LICENSE IN FEEL-FREE.md7. X117. X11WeaklyWeaklyprotectiveprotective1. LGPL-3.0-or-later1. LGPL-3.0-or-laterUncategorizedUncategorized1. Chromium's License (pathseg (1.2.0))1. Chromium's License (pathseg (1.2.0))MissingMissing1. null (base64-arraybuffer (0.2.0))1. null (base64-arraybuffer (0.2.0)) \ No newline at end of file +License typesLicense types(project, deps, and bundled devDeps)(project, deps, and bundled devDeps)PermissivePermissive1. (MIT OR Apache-2.0)1. (MIT OR Apache-2.0)2. (MPL-2.0 OR Apache-2.0)2. (MPL-2.0 OR Apache-2.0)3. Apache-2.03. Apache-2.04. ISC4. ISC5. MIT5. MIT6. MIT OR SEE LICENSE IN FEEL-FREE.md6. MIT OR SEE LICENSE IN FEEL-FREE.md7. X117. X11WeaklyWeaklyprotectiveprotective1. LGPL-3.0-or-later1. LGPL-3.0-or-laterUncategorizedUncategorized1. Chromium's License (pathseg (1.2.0))1. Chromium's License (pathseg (1.2.0)) \ No newline at end of file diff --git a/dist/editor/index.html b/dist/editor/index.html index c106cf8b..f6e1dc26 100644 --- a/dist/editor/index.html +++ b/dist/editor/index.html @@ -114,6 +114,11 @@
SVG-Edit Home Page +
  • + + Deploys by Netlify + +
  • diff --git a/dist/editor/jgraduate/jQuery.jGraduate.js b/dist/editor/jgraduate/jQuery.jGraduate.js index 2bdfbfc2..ed200976 100644 --- a/dist/editor/jgraduate/jQuery.jGraduate.js +++ b/dist/editor/jgraduate/jQuery.jGraduate.js @@ -244,9 +244,9 @@ export default function jQueryPluginJGraduate ($) { * @typedef {PlainObject} module:jGraduate.Options * @property {module:jGraduate~Paint} [paint] A Paint object object describing the paint to display initially; defaults to a new instance without options (defaults to opaque white) * @property {external:Window} [window] - * @property {string} [window.pickerTitle='Drag markers to pick a paint'] + * @property {string} [window.pickerTitle="Drag markers to pick a paint"] * @property {PlainObject} [images] - * @property {string} [images.clientPath='images/'] + * @property {string} [images.clientPath="images/"] * @property {"same"|"inverse"|"black"|"white"|module:jGraduate.ColorOpac} [newstop="inverse"] */ diff --git a/dist/editor/system/index.html b/dist/editor/system/index.html index a2fd4f35..891c25bd 100644 --- a/dist/editor/system/index.html +++ b/dist/editor/system/index.html @@ -121,6 +121,11 @@
    SVG-Edit Home Page +
  • + + Deploys by Netlify + +
  • diff --git a/dist/editor/system/jgraduate/jQuery.jGraduate.js b/dist/editor/system/jgraduate/jQuery.jGraduate.js index 2bdfbfc2..ed200976 100644 --- a/dist/editor/system/jgraduate/jQuery.jGraduate.js +++ b/dist/editor/system/jgraduate/jQuery.jGraduate.js @@ -244,9 +244,9 @@ export default function jQueryPluginJGraduate ($) { * @typedef {PlainObject} module:jGraduate.Options * @property {module:jGraduate~Paint} [paint] A Paint object object describing the paint to display initially; defaults to a new instance without options (defaults to opaque white) * @property {external:Window} [window] - * @property {string} [window.pickerTitle='Drag markers to pick a paint'] + * @property {string} [window.pickerTitle="Drag markers to pick a paint"] * @property {PlainObject} [images] - * @property {string} [images.clientPath='images/'] + * @property {string} [images.clientPath="images/"] * @property {"same"|"inverse"|"black"|"white"|module:jGraduate.ColorOpac} [newstop="inverse"] */ diff --git a/dist/editor/xdomain-index.html b/dist/editor/xdomain-index.html index c4710012..9ce935e9 100644 --- a/dist/editor/xdomain-index.html +++ b/dist/editor/xdomain-index.html @@ -114,6 +114,11 @@
    SVG-Edit Home Page +
  • + + Deploys by Netlify + +
  • diff --git a/package.json b/package.json index d40ec3fb..077db4d1 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "open-cov": "run-p start open-cov-no-start", "report": "run-s report-no-mochawesome mochawesome-cli", "report-summary": "run-s report-text-summary mochawesome-cli-dot", - "license-badge": "license-badger --uncategorizedLicenseTemplate \"\\${license} (\\${name} (\\${version}))\" --filteredTypes=nonempty --textTemplate \"License types\n(project, deps, and bundled devDeps)\" --packageJson --production badges/licenses-badge.svg", + "license-badge": "license-badger --corrections --uncategorizedLicenseTemplate \"\\${license} (\\${name} (\\${version}))\" --filteredTypes=nonempty --textTemplate \"License types\n(project, deps, and bundled devDeps)\" --packageJson --production badges/licenses-badge.svg", "license-badge-dev": "license-badger --corrections --filteredTypes=nonempty --textTemplate \"License types\n(all devDeps)\" --allDevelopment badges/licenses-badge-dev.svg", "license-badges": "run-s license-badge license-badge-dev", "coverage-badge": "coveradge badges/coverage-badge", diff --git a/src/editor/extensions/ext-server_opensave/ext-server_opensave.js b/src/editor/extensions/ext-server_opensave/ext-server_opensave.js index c046f1de..6572f6d6 100644 --- a/src/editor/extensions/ext-server_opensave/ext-server_opensave.js +++ b/src/editor/extensions/ext-server_opensave/ext-server_opensave.js @@ -53,7 +53,7 @@ export default { /** * - * @param {string} [filename='image'] + * @param {string} [filename="image"] * @param {string} suffix To add to file name * @param {string} uri * @returns {boolean} diff --git a/src/editor/index.html b/src/editor/index.html index fc1ebd8f..ff4fcd33 100644 --- a/src/editor/index.html +++ b/src/editor/index.html @@ -114,6 +114,11 @@
    SVG-Edit Home Page +
  • + + Deploys by Netlify + +
  • diff --git a/src/editor/jgraduate/jQuery.jGraduate.js b/src/editor/jgraduate/jQuery.jGraduate.js index 2bdfbfc2..ed200976 100644 --- a/src/editor/jgraduate/jQuery.jGraduate.js +++ b/src/editor/jgraduate/jQuery.jGraduate.js @@ -244,9 +244,9 @@ export default function jQueryPluginJGraduate ($) { * @typedef {PlainObject} module:jGraduate.Options * @property {module:jGraduate~Paint} [paint] A Paint object object describing the paint to display initially; defaults to a new instance without options (defaults to opaque white) * @property {external:Window} [window] - * @property {string} [window.pickerTitle='Drag markers to pick a paint'] + * @property {string} [window.pickerTitle="Drag markers to pick a paint"] * @property {PlainObject} [images] - * @property {string} [images.clientPath='images/'] + * @property {string} [images.clientPath="images/"] * @property {"same"|"inverse"|"black"|"white"|module:jGraduate.ColorOpac} [newstop="inverse"] */ diff --git a/src/editor/svgedit.js b/src/editor/svgedit.js index 2c984cd4..d3b39c8c 100644 --- a/src/editor/svgedit.js +++ b/src/editor/svgedit.js @@ -91,7 +91,7 @@ const callbacks = [], * Preferences. * @interface module:SVGEditor.Prefs * @property {string} [lang="en"] Two-letter language code. The language must exist in the Editor Preferences language list. Defaults to "en" if `locale.js` detection does not detect another language. - * @property {module:SVGEditor.IconSize} [iconsize="s"|"m"] Size of the toolbar icons. Will default to 's' if the window height is smaller than the minimum height and 'm' otherwise. + * @property {module:SVGEditor.IconSize} [iconsize="s" || "m"] Size of the toolbar icons. Will default to 's' if the window height is smaller than the minimum height and 'm' otherwise. * @property {string} [bkgd_color="#FFF"] Color hex for canvas background color. Defaults to white. * @property {string} [bkgd_url=""] Background raster image URL. This image will fill the background of the document; useful for tracing purposes. * @property {"embed"|"ref"} [img_save="embed"] Defines whether included raster images should be saved as Data URIs when possible, or as URL references. Settable in the Document Properties dialog. @@ -167,7 +167,7 @@ const callbacks = [], * @property {boolean} [avoidClientSide=false] DEPRECATED (use `avoidClientSideDownload` instead); Used by `ext-server_opensave.js`; set to `true` if you wish to always save to server and not only as fallback when client support is lacking * @property {boolean} [avoidClientSideDownload=false] Used by `ext-server_opensave.js`; set to `true` if you wish to always save to server and not only as fallback when client support is lacking * @property {boolean} [avoidClientSideOpen=false] Used by `ext-server_opensave.js`; set to `true` if you wish to always open from the server and not only as fallback when FileReader client support is lacking - * @property {string[]} [extensions=module:SVGEditor~defaultExtensions] Extensions to load on startup. Use an array in `setConfig` and comma separated file names in the URL. Extension names must begin with "ext-". Note that as of version 2.7, paths containing "/", "\", or ":", are disallowed for security reasons. Although previous versions of this list would entirely override the default list, as of version 2.7, the defaults will always be added to this explicit list unless the configuration `noDefaultExtensions` is included. + * @property {string[]} [extensions=[]] Extensions to load on startup. Use an array in `setConfig` and comma separated file names in the URL. Extension names must begin with "ext-". Note that as of version 2.7, paths containing "/", "\", or ":", are disallowed for security reasons. Although previous versions of this list would entirely override the default list, as of version 2.7, the defaults will always be added to this explicit list unless the configuration `noDefaultExtensions` is included. See {@link module:SVGEditor~defaultExtensions}. * @property {string[]} [allowedOrigins=[]] Used by `ext-xdomain-messaging.js` to indicate which origins are permitted for cross-domain messaging (e.g., between the embedded editor and main editor code). Besides explicit domains, one might add '*' to allow all domains (not recommended for privacy/data integrity of your user's content!), `window.location.origin` for allowing the same origin (should be safe if you trust all apps on your domain), 'null' to allow `file:///` URL usage * @property {null|PlainObject} [colorPickerCSS=null] Object of CSS properties mapped to values (for jQuery) to apply to the color picker. See {@link http://api.jquery.com/css/#css-properties}. A `null` value (the default) will cause the CSS to default to `left` with a position equal to that of the `fill_color` or `stroke_color` element minus 140, and a `bottom` equal to 40 * @property {string} [paramurl] This was available via URL only. Allowed an un-encoded URL within the query string (use "url" or "source" with a data: URI instead) @@ -1601,7 +1601,7 @@ editor.init = () => { /** * @param {PlainObject} [opts={}] - * @param {boolean} [opts.cancelDeletes=false}] + * @param {boolean} [opts.cancelDeletes=false] * @returns {Promise} Resolves to `undefined` */ async function promptImgURL ({cancelDeletes = false} = {}) { diff --git a/src/svgcanvas/dbox.js b/src/svgcanvas/dbox.js index bdf403ee..5d3a1968 100644 --- a/src/svgcanvas/dbox.js +++ b/src/svgcanvas/dbox.js @@ -165,7 +165,7 @@ export default function jQueryPluginDBox ($, { }; /** * @param {string} msg Message to accompany the prompt - * @param {string} [defaultText=''] The default text to show for the prompt + * @param {string} [defaultText=""] The default text to show for the prompt * @returns {jQueryPluginDBox.ResultPromise} */ $.prompt = function (msg, defaultText = '') {