diff --git a/index.js b/index.js index 11957df..ec927cc 100644 --- a/index.js +++ b/index.js @@ -521,7 +521,8 @@ module.exports = { checkDestructured: true, checkRestProperty: true, allowExtraTrailingParamDocs: false, - useDefaultObjectProperties: true, + useDefaultObjectProperties: false, + disableExtraPropertyReporting: true, }, ], 'jsdoc/check-property-names': 'error', @@ -536,10 +537,17 @@ module.exports = { 'jsdoc/implements-on-classes': 'error', 'jsdoc/match-description': 'off', 'jsdoc/newline-after-description': ['error', 'always'], - 'jsdoc/no-bad-blocks': 'error', + 'jsdoc/no-bad-blocks': ['error', { preventAllMultiAsteriskBlocks: true }], 'jsdoc/no-defaults': 'off', + 'jsdoc/no-missing-syntax': 'off', + 'jsdoc/no-restricted-syntax': 'off', 'jsdoc/no-types': 'off', // only needed if using TS 'jsdoc/no-undefined-types': 'off', // weird to enforce without formal TS support + 'jsdoc/require-asterisk-prefix': [ + 'error', + 'always', + { tags: { any: ['*description'] } }, + ], 'jsdoc/require-description-complete-sentence': 'off', // too strict 'jsdoc/require-description': 'off', // too strict 'jsdoc/require-example': 'off', // too strict @@ -558,7 +566,7 @@ module.exports = { 'jsdoc/require-property-name': 'error', 'jsdoc/require-property-type': 'error', 'jsdoc/require-property': 'error', - 'jsdoc/require-returns-check': 'error', + 'jsdoc/require-returns-check': ['error', { exemptAsync: false }], 'jsdoc/require-returns-description': 'off', // not needed when function is clear enough 'jsdoc/require-returns-type': 'error', 'jsdoc/require-returns': [ @@ -579,6 +587,7 @@ module.exports = { { checkGeneratorsOnly: true, next: true }, ], 'jsdoc/require-throws': 'off', + 'jsdoc/tag-lines': 'off', 'jsdoc/valid-types': ['error', { allowEmptyNamepaths: true }], /** diff --git a/package-lock.json b/package-lock.json index 70ae8a2..1c8cdd6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,7 @@ "eslint-plugin-ava": "13.2.0", "eslint-plugin-eslint-comments": "3.2.0", "eslint-plugin-import": "2.26.0", - "eslint-plugin-jsdoc": "^31.2.3", + "eslint-plugin-jsdoc": "^34.4.0", "eslint-plugin-lodash": "7.4.0", "eslint-plugin-mocha": "10.0.5", "eslint-plugin-n": "^15.2.4", @@ -153,6 +153,19 @@ "node": ">=0.10.0" } }, + "node_modules/@es-joy/jsdoccomment": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.6.0.tgz", + "integrity": "sha512-zT1EtysKMITJ7vE4RvOJqitxk/Str6It8hq+fykxkwLuTyzgak+TnVuVSIyovT/qrEz3i46ypCSXgNtIDYwNOg==", + "dependencies": { + "comment-parser": "^1.1.5", + "esquery": "^1.4.0", + "jsdoctypeparser": "^9.0.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/@eslint/eslintrc": { "version": "0.4.3", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", @@ -1405,9 +1418,9 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, "node_modules/comment-parser": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.1.1.tgz", - "integrity": "sha512-vue7cRi1ZO5/72FJ+wZ5+siTSBlUv3ZksTk8bWD2IkaA6obitzMZP3yI65azTJLckwmi8lxfPP5Sd9oGuZ8e2g==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.1.5.tgz", + "integrity": "sha512-RePCE4leIhBlmrqiYTvaqEeGYg7qpSl4etaIabKtdOQVi+mSTIBBklGUwIr79GXYnl3LpMwmDw4KeR2stNc6FA==", "engines": { "node": ">= 10.0.0" } @@ -2394,20 +2407,22 @@ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, "node_modules/eslint-plugin-jsdoc": { - "version": "31.2.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-31.2.3.tgz", - "integrity": "sha512-5M9DVI7RtBavBmBL8uorpcdrEFrpyAikmERTuFvWbRomwJPJFLGweVgh7OhfUEY0jGX6F7Vh2C6NBoOQsqlI1g==", + "version": "34.4.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-34.4.0.tgz", + "integrity": "sha512-eyvnicgSb/Kj/fcg+Uu01Ij8g5epJS1TlLMpz3mpSOetNiItKVWI5b4OqHqQYvE6VTwKT02p+uzb9IpynDxvSQ==", "dependencies": { - "comment-parser": "1.1.1", + "@es-joy/jsdoccomment": "^0.6.0", + "comment-parser": "1.1.5", "debug": "^4.3.1", + "esquery": "^1.4.0", "jsdoctypeparser": "^9.0.0", - "lodash": "^4.17.20", + "lodash": "^4.17.21", "regextras": "^0.7.1", - "semver": "^7.3.4", + "semver": "^7.3.5", "spdx-expression-parse": "^3.0.1" }, "engines": { - "node": ">=10" + "node": ">=12" }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0" @@ -9748,6 +9763,16 @@ } } }, + "@es-joy/jsdoccomment": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.6.0.tgz", + "integrity": "sha512-zT1EtysKMITJ7vE4RvOJqitxk/Str6It8hq+fykxkwLuTyzgak+TnVuVSIyovT/qrEz3i46ypCSXgNtIDYwNOg==", + "requires": { + "comment-parser": "^1.1.5", + "esquery": "^1.4.0", + "jsdoctypeparser": "^9.0.0" + } + }, "@eslint/eslintrc": { "version": "0.4.3", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", @@ -10716,9 +10741,9 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, "comment-parser": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.1.1.tgz", - "integrity": "sha512-vue7cRi1ZO5/72FJ+wZ5+siTSBlUv3ZksTk8bWD2IkaA6obitzMZP3yI65azTJLckwmi8lxfPP5Sd9oGuZ8e2g==" + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.1.5.tgz", + "integrity": "sha512-RePCE4leIhBlmrqiYTvaqEeGYg7qpSl4etaIabKtdOQVi+mSTIBBklGUwIr79GXYnl3LpMwmDw4KeR2stNc6FA==" }, "common-path-prefix": { "version": "3.0.0", @@ -11475,16 +11500,18 @@ } }, "eslint-plugin-jsdoc": { - "version": "31.2.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-31.2.3.tgz", - "integrity": "sha512-5M9DVI7RtBavBmBL8uorpcdrEFrpyAikmERTuFvWbRomwJPJFLGweVgh7OhfUEY0jGX6F7Vh2C6NBoOQsqlI1g==", + "version": "34.4.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-34.4.0.tgz", + "integrity": "sha512-eyvnicgSb/Kj/fcg+Uu01Ij8g5epJS1TlLMpz3mpSOetNiItKVWI5b4OqHqQYvE6VTwKT02p+uzb9IpynDxvSQ==", "requires": { - "comment-parser": "1.1.1", + "@es-joy/jsdoccomment": "^0.6.0", + "comment-parser": "1.1.5", "debug": "^4.3.1", + "esquery": "^1.4.0", "jsdoctypeparser": "^9.0.0", - "lodash": "^4.17.20", + "lodash": "^4.17.21", "regextras": "^0.7.1", - "semver": "^7.3.4", + "semver": "^7.3.5", "spdx-expression-parse": "^3.0.1" } }, diff --git a/package.json b/package.json index 64aeac9..0be8523 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "eslint-plugin-ava": "13.2.0", "eslint-plugin-eslint-comments": "3.2.0", "eslint-plugin-import": "2.26.0", - "eslint-plugin-jsdoc": "^31.2.3", + "eslint-plugin-jsdoc": "^34.4.0", "eslint-plugin-lodash": "7.4.0", "eslint-plugin-mocha": "10.0.5", "eslint-plugin-n": "^15.2.4",