Skip to content

Commit da81e66

Browse files
authored
chore: update eslint-plugin-jsdoc to 46.2.5 (#17245)
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.
1 parent 526e911 commit da81e66

File tree

6 files changed

+13
-18
lines changed

6 files changed

+13
-18
lines changed

lib/rule-tester/flat-rule-tester.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const { ConfigArraySymbol } = require("@humanwhocodes/config-array");
3333
/** @typedef {import("../shared/types").Parser} Parser */
3434
/** @typedef {import("../shared/types").LanguageOptions} LanguageOptions */
3535

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

7776
//------------------------------------------------------------------------------
7877
// Private Members

lib/rule-tester/rule-tester.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const { SourceCode } = require("../source-code");
6363

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

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

113112
//------------------------------------------------------------------------------
114113
// Private Members

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
"eslint-plugin-eslint-comments": "^3.2.0",
116116
"eslint-plugin-eslint-plugin": "^5.1.0",
117117
"eslint-plugin-internal-rules": "file:tools/internal-rules",
118-
"eslint-plugin-jsdoc": "^38.1.6",
118+
"eslint-plugin-jsdoc": "^46.2.5",
119119
"eslint-plugin-n": "^16.0.0",
120120
"eslint-plugin-unicorn": "^42.0.0",
121121
"eslint-release": "^3.2.0",

packages/eslint-config-eslint/eslintrc.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,16 +101,15 @@ module.exports = {
101101
"generator-star-spacing": "error",
102102
"grouped-accessor-pairs": "error",
103103
"guard-for-in": "error",
104-
"jsdoc/check-line-alignment": ["error", "never"],
105104
"jsdoc/check-syntax": "error",
106105
"jsdoc/check-values": [
107106
"error",
108107
{
109108
allowedLicenses: true
110109
}
111110
],
112-
"jsdoc/newline-after-description": ["error", "never"],
113111
"jsdoc/no-bad-blocks": "error",
112+
"jsdoc/no-defaults": "off",
114113
"jsdoc/require-asterisk-prefix": "error",
115114
"jsdoc/require-description": [
116115
"error",
@@ -138,8 +137,10 @@ module.exports = {
138137
fileoverview: {
139138
lines: "any"
140139
}
141-
}
140+
},
141+
startLines: 0
142142
}
143+
143144
],
144145
"jsdoc/no-undefined-types": "off",
145146
"jsdoc/require-yields": "off",

packages/eslint-config-eslint/index.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -312,11 +312,10 @@ const jsdocConfigs = [jsdoc.configs.recommended, {
312312
}
313313
},
314314
rules: {
315-
"jsdoc/check-line-alignment": ["error", "never"],
316315
"jsdoc/check-syntax": "error",
317316
"jsdoc/check-values": ["error", { allowedLicenses: true }],
318-
"jsdoc/newline-after-description": ["error", "never"],
319317
"jsdoc/no-bad-blocks": "error",
318+
"jsdoc/no-defaults": "off",
320319
"jsdoc/require-asterisk-prefix": "error",
321320
"jsdoc/require-description": ["error", { checkConstructors: false }],
322321
"jsdoc/require-hyphen-before-param-description": ["error", "never"],
@@ -330,13 +329,10 @@ const jsdocConfigs = [jsdoc.configs.recommended, {
330329
"jsdoc/tag-lines": ["error", "never",
331330
{
332331
tags: {
333-
example: {
334-
lines: "always"
335-
},
336-
fileoverview: {
337-
lines: "any"
338-
}
339-
}
332+
example: { lines: "always" },
333+
fileoverview: { lines: "any" }
334+
},
335+
startLines: 0
340336
}
341337
],
342338
"jsdoc/no-undefined-types": "off",

packages/eslint-config-eslint/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"dependencies": {
2323
"@eslint/js": "^8.42.0",
2424
"eslint-plugin-eslint-comments": "^3.2.0",
25-
"eslint-plugin-jsdoc": "^38.1.6",
25+
"eslint-plugin-jsdoc": "^46.2.5",
2626
"eslint-plugin-n": "^16.0.0",
2727
"eslint-plugin-unicorn": "^42.0.0"
2828
},

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy