diff --git a/.eslintrc.js b/.eslintrc.js index c6173bfb..43093357 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -65,8 +65,9 @@ module.exports = { } } */ + // Todo: Remove after ash-nazg update forceRequireReturn: true, - // Todo: Once PR to eslint-plugin-jsdoc may be merged, fix its "reenable later" to-dos for `jsdoc/check-types` in canvg.js file + // Todo: Remove if ash-nazg has sufficiently merged preferredTypes: { "*": { message: "Use a more precise type or if necessary use `{{preferredType}}` or `ArbitraryCallbackResult`", @@ -83,11 +84,11 @@ module.exports = { message: "Point to a `@callback` namepath or `{{preferredType}}` if truly arbitrary in form", replacement: "GenericCallback" }, - 'object<>': { + object: { message: "Use the specific object type or `{{preferredType}}` (or `ArbitraryObject` or `ArbitraryModule`) if truly arbitrary", replacement: "PlainObject" }, - 'Array<>': { + Array: { message: "Use `{{preferredType}}` (or `ArgumentsArray`) if it is truly arbitrary.", replacement: "GenericArray" } diff --git a/editor/canvg/canvg.js b/editor/canvg/canvg.js index 8710d1eb..5fd09581 100644 --- a/editor/canvg/canvg.js +++ b/editor/canvg/canvg.js @@ -90,14 +90,14 @@ export const canvg = function (target, s, opts) { return svg.load(ctx, s); }; -/* Todo: Reenable after ash-nazg may merge; eslint-disable jsdoc/check-types */ +/* eslint-disable jsdoc/check-types */ /** * @param {module:canvg.CanvgOptions} opts * @returns {object} * @todo Flesh out exactly what object is returned here (after updating to latest and reincluding our changes here and those of StackBlur) */ function build (opts) { - /* Todo: Reenable after ash-nazg may merge; eslint-enable jsdoc/check-types */ + /* eslint-enable jsdoc/check-types */ const svg = {opts}; svg.FRAMERATE = 30; diff --git a/package-lock.json b/package-lock.json index ec03758f..47880172 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4178,9 +4178,9 @@ } }, "eslint-plugin-jsdoc": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-6.0.3.tgz", - "integrity": "sha512-J5aHmFxxWi/82xcmnJLjfcwiJR1uu13jK4AhRFY0KoK0ItcuPoKesvW6O4gjgdIn82Y5Bd4enWTkiop/wslDcw==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-7.0.0.tgz", + "integrity": "sha512-Yu9nfWDG5zJWK1l65MYu7GjHPltPdhZz8m6oqD/h2jDxNgSltgqH5irR5kS38F3eTb4zhS7+FaHE8bz1ph7omQ==", "dev": true, "requires": { "comment-parser": "^0.5.4", diff --git a/package.json b/package.json index b6b9991c..b0c59499 100644 --- a/package.json +++ b/package.json @@ -91,7 +91,7 @@ "eslint-plugin-compat": "^3.1.1", "eslint-plugin-eslint-comments": "^3.1.1", "eslint-plugin-import": "2.17.2", - "eslint-plugin-jsdoc": "^6.0.3", + "eslint-plugin-jsdoc": "^7.0.0", "eslint-plugin-markdown": "^1.0.0", "eslint-plugin-no-use-extend-native": "^0.4.0", "eslint-plugin-node": "9.1.0",