diff --git a/index.js b/index.js index f4119fb..68c1b49 100644 --- a/index.js +++ b/index.js @@ -542,7 +542,8 @@ module.exports = { checkDestructured: true, checkRestProperty: true, allowExtraTrailingParamDocs: false, - useDefaultObjectProperties: true, + useDefaultObjectProperties: false, + disableExtraPropertyReporting: true, }, ], 'jsdoc/check-property-names': 'error', @@ -557,10 +558,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 @@ -579,7 +587,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': [ @@ -600,6 +608,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 cdf1356..1294d7a 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", @@ -135,6 +135,19 @@ "node": ">=0.1.90" } }, + "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": "1.3.0", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz", @@ -1499,9 +1512,9 @@ "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" }, "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" } @@ -2292,20 +2305,22 @@ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "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" @@ -9580,6 +9595,16 @@ "dev": true, "optional": true }, + "@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": "1.3.0", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz", @@ -10611,9 +10636,9 @@ "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" }, "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", @@ -11275,16 +11300,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 101f882..24a78ee 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-no-use-extend-native": "0.5.0",