Skip to content

Commit

Permalink
chore: update eslint-plugin-jsdoc to 46.2.5 (#17245)
Browse files Browse the repository at this point in the history
1. Removes `jsdoc/newline-after-description` rule in favor of `jsdoc/tag-lines`
with option `startLines: 0` for "never" and `startLines: 1` for "always".
Refs: https://github.com/gajus/eslint-plugin-jsdoc/releases/tag/v42.0.0

2. disabled rule jsdoc/no-defaults: it's a new added rule in its recommended config
 that eslint does not follow.

3. disabled rule jsdoc/check-line-alignment: I've tried its option "never"|"always"|"any"
- none of them fully meet our needs.
  • Loading branch information
aladdin-add committed Jun 21, 2023
1 parent 526e911 commit da81e66
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 18 deletions.
3 changes: 1 addition & 2 deletions lib/rule-tester/flat-rule-tester.js
Expand Up @@ -33,7 +33,7 @@ const { ConfigArraySymbol } = require("@humanwhocodes/config-array");
/** @typedef {import("../shared/types").Parser} Parser */
/** @typedef {import("../shared/types").LanguageOptions} LanguageOptions */

/* eslint-disable jsdoc/valid-types -- https://github.com/jsdoc-type-pratt-parser/jsdoc-type-pratt-parser/issues/4#issuecomment-778805577 */

/**
* A test case that is expected to pass lint.
* @typedef {Object} ValidTestCase
Expand Down Expand Up @@ -72,7 +72,6 @@ const { ConfigArraySymbol } = require("@humanwhocodes/config-array");
* @property {number} [endLine] The 1-based line number of the reported end location.
* @property {number} [endColumn] The 1-based column number of the reported end location.
*/
/* eslint-enable jsdoc/valid-types -- https://github.com/jsdoc-type-pratt-parser/jsdoc-type-pratt-parser/issues/4#issuecomment-778805577 */

//------------------------------------------------------------------------------
// Private Members
Expand Down
3 changes: 1 addition & 2 deletions lib/rule-tester/rule-tester.js
Expand Up @@ -63,7 +63,7 @@ const { SourceCode } = require("../source-code");

/** @typedef {import("../shared/types").Parser} Parser */

/* eslint-disable jsdoc/valid-types -- https://github.com/jsdoc-type-pratt-parser/jsdoc-type-pratt-parser/issues/4#issuecomment-778805577 */

/**
* A test case that is expected to pass lint.
* @typedef {Object} ValidTestCase
Expand Down Expand Up @@ -108,7 +108,6 @@ const { SourceCode } = require("../source-code");
* @property {number} [endLine] The 1-based line number of the reported end location.
* @property {number} [endColumn] The 1-based column number of the reported end location.
*/
/* eslint-enable jsdoc/valid-types -- https://github.com/jsdoc-type-pratt-parser/jsdoc-type-pratt-parser/issues/4#issuecomment-778805577 */

//------------------------------------------------------------------------------
// Private Members
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -115,7 +115,7 @@
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-eslint-plugin": "^5.1.0",
"eslint-plugin-internal-rules": "file:tools/internal-rules",
"eslint-plugin-jsdoc": "^38.1.6",
"eslint-plugin-jsdoc": "^46.2.5",
"eslint-plugin-n": "^16.0.0",
"eslint-plugin-unicorn": "^42.0.0",
"eslint-release": "^3.2.0",
Expand Down
7 changes: 4 additions & 3 deletions packages/eslint-config-eslint/eslintrc.js
Expand Up @@ -101,16 +101,15 @@ module.exports = {
"generator-star-spacing": "error",
"grouped-accessor-pairs": "error",
"guard-for-in": "error",
"jsdoc/check-line-alignment": ["error", "never"],
"jsdoc/check-syntax": "error",
"jsdoc/check-values": [
"error",
{
allowedLicenses: true
}
],
"jsdoc/newline-after-description": ["error", "never"],
"jsdoc/no-bad-blocks": "error",
"jsdoc/no-defaults": "off",
"jsdoc/require-asterisk-prefix": "error",
"jsdoc/require-description": [
"error",
Expand Down Expand Up @@ -138,8 +137,10 @@ module.exports = {
fileoverview: {
lines: "any"
}
}
},
startLines: 0
}

],
"jsdoc/no-undefined-types": "off",
"jsdoc/require-yields": "off",
Expand Down
14 changes: 5 additions & 9 deletions packages/eslint-config-eslint/index.js
Expand Up @@ -312,11 +312,10 @@ const jsdocConfigs = [jsdoc.configs.recommended, {
}
},
rules: {
"jsdoc/check-line-alignment": ["error", "never"],
"jsdoc/check-syntax": "error",
"jsdoc/check-values": ["error", { allowedLicenses: true }],
"jsdoc/newline-after-description": ["error", "never"],
"jsdoc/no-bad-blocks": "error",
"jsdoc/no-defaults": "off",
"jsdoc/require-asterisk-prefix": "error",
"jsdoc/require-description": ["error", { checkConstructors: false }],
"jsdoc/require-hyphen-before-param-description": ["error", "never"],
Expand All @@ -330,13 +329,10 @@ const jsdocConfigs = [jsdoc.configs.recommended, {
"jsdoc/tag-lines": ["error", "never",
{
tags: {
example: {
lines: "always"
},
fileoverview: {
lines: "any"
}
}
example: { lines: "always" },
fileoverview: { lines: "any" }
},
startLines: 0
}
],
"jsdoc/no-undefined-types": "off",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-eslint/package.json
Expand Up @@ -22,7 +22,7 @@
"dependencies": {
"@eslint/js": "^8.42.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-jsdoc": "^38.1.6",
"eslint-plugin-jsdoc": "^46.2.5",
"eslint-plugin-n": "^16.0.0",
"eslint-plugin-unicorn": "^42.0.0"
},
Expand Down

0 comments on commit da81e66

Please sign in to comment.