diff --git a/README.md b/README.md index f092b54c6..c98d4a422 100644 --- a/README.md +++ b/README.md @@ -11854,6 +11854,14 @@ function quux ({"foo": bar}) { function quux ({foo: bar}) { } + +/** + * Description. + * @param {string} b Description `/**`. + */ +module.exports = function a(b) { + console.info(b); +}; ```` diff --git a/package.json b/package.json index 670d03159..e9268cec6 100644 --- a/package.json +++ b/package.json @@ -5,10 +5,10 @@ "url": "http://gajus.com" }, "dependencies": { - "comment-parser": "^0.7.5", + "comment-parser": "^0.7.6", "debug": "^4.1.1", "jsdoctypeparser": "^9.0.0", - "lodash": "^4.17.19", + "lodash": "^4.17.20", "regextras": "^0.7.1", "semver": "^7.3.2", "spdx-expression-parse": "^3.0.1" @@ -27,7 +27,7 @@ "babel-plugin-istanbul": "^6.0.0", "chai": "^4.2.0", "cross-env": "^7.0.2", - "eslint": "7.6.0", + "eslint": "7.7.0", "eslint-config-canonical": "^23.0.0", "gitdown": "^3.1.3", "glob": "^7.1.6", diff --git a/src/rules/noDefaults.js b/src/rules/noDefaults.js index 178e0194f..6f085cf6a 100644 --- a/src/rules/noDefaults.js +++ b/src/rules/noDefaults.js @@ -9,12 +9,12 @@ export default iterateJsdoc(({ paramTags.forEach((tag) => { if (noOptionalParamNames && tag.optional) { utils.reportJSDoc(`Optional param names are not permitted on @${tag.tag}.`, tag, () => { - tag.default = ''; + tag.default = undefined; tag.optional = false; }); } else if (tag.default) { utils.reportJSDoc(`Defaults are not permitted on @${tag.tag}.`, tag, () => { - tag.default = ''; + tag.default = undefined; }); } }); diff --git a/test/rules/assertions/requireParam.js b/test/rules/assertions/requireParam.js index 52d38e702..fad3d2803 100644 --- a/test/rules/assertions/requireParam.js +++ b/test/rules/assertions/requireParam.js @@ -2843,5 +2843,16 @@ export default { } `, }, + { + code: ` + /** + * Description. + * @param {string} b Description \`/**\`. + */ + module.exports = function a(b) { + console.info(b); + }; + `, + }, ], };