eslint-plugin-jsdoc 48.0.4 → 48.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -265,7 +265,7 @@ non-default-recommended fixer).
|
|
|
265
265
|
|:heavy_check_mark:||[check-values](./docs/rules/check-values.md#readme)|Checks for expected content within some miscellaneous tags (`@version`, `@since`, `@license`, `@author`)|
|
|
266
266
|
|:heavy_check_mark:|:wrench:|[empty-tags](./docs/rules/empty-tags.md#readme)|Checks tags that are expected to be empty (e.g., `@abstract` or `@async`), reporting if they have content|
|
|
267
267
|
|:heavy_check_mark:||[implements-on-classes](./docs/rules/implements-on-classes.md#readme)|Prohibits use of `@implements` on non-constructor functions (to enforce the tag only being used on classes/constructors)|
|
|
268
|
-
|||[informative-docs](./docs/rules/informative-docs.md#readme)|Reports on JSDoc texts that serve only to
|
|
268
|
+
|||[informative-docs](./docs/rules/informative-docs.md#readme)|Reports on JSDoc texts that serve only to restate their attached name.|
|
|
269
269
|
|||[match-description](./docs/rules/match-description.md#readme)|Defines customizable regular expression rules for your tag descriptions|
|
|
270
270
|
||:wrench:|[match-name](./docs/rules/match-name.md#readme)|Reports the name portion of a JSDoc tag if matching or not matching a given regular expression|
|
|
271
271
|
|:heavy_check_mark:|:wrench:|[multiline-blocks](./docs/rules/multiline-blocks.md#readme)|Controls how and whether jsdoc blocks can be expressed as single or multiple line blocks|
|
|
@@ -28,6 +28,10 @@ const getNamesFromNode = node => {
|
|
|
28
28
|
case 'TSAbstractPropertyDefinition':
|
|
29
29
|
return [...getNamesFromNode( /** @type {import('@typescript-eslint/types').TSESTree.Node} */node.parent.parent), ...getNamesFromNode( /** @type {import('@typescript-eslint/types').TSESTree.Node} */
|
|
30
30
|
node.key)];
|
|
31
|
+
case 'ExportDefaultDeclaration':
|
|
32
|
+
case 'ExportNamedDeclaration':
|
|
33
|
+
return getNamesFromNode( /** @type {import('@typescript-eslint/types').TSESTree.ExportNamedDeclaration} */
|
|
34
|
+
node.declaration);
|
|
31
35
|
case 'ClassDeclaration':
|
|
32
36
|
case 'ClassExpression':
|
|
33
37
|
case 'FunctionDeclaration':
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"informativeDocs.cjs","names":["_iterateJsdoc","_interopRequireDefault","require","_areDocsInformative","obj","__esModule","default","defaultAliases","a","defaultUselessWords","getNamesFromNode","node","type","parent","key","id","name","declarations","init","filter","Boolean","_default","exports","iterateJsdoc","context","jsdoc","report","utils","aliases","excludedTags","uselessWords","options","nodeNames","descriptionIsRedundant","text","extraName","textTrimmed","trim","areDocsInformative","join","description","lastDescriptionLine","getDescription","descriptionReported","tag","tags","includes","reportJSDoc","line","iterateAllJsdocs","meta","docs","url","schema","additionalProperties","properties","patternProperties","items","module"],"sources":["../../src/rules/informativeDocs.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc.js';\nimport {\n areDocsInformative,\n} from 'are-docs-informative';\n\nconst defaultAliases = {\n a: [\n 'an', 'our',\n ],\n};\n\nconst defaultUselessWords = [\n 'a', 'an', 'i', 'in', 'of', 's', 'the',\n];\n\n/* eslint-disable complexity -- Temporary */\n\n/**\n * @param {import('eslint').Rule.Node|import('@typescript-eslint/types').TSESTree.Node|null|undefined} node\n * @returns {string[]}\n */\nconst getNamesFromNode = (node) => {\n switch (node?.type) {\n case 'AccessorProperty':\n case 'MethodDefinition':\n case 'PropertyDefinition':\n case 'TSAbstractAccessorProperty':\n case 'TSAbstractMethodDefinition':\n case 'TSAbstractPropertyDefinition':\n return [\n ...getNamesFromNode(\n /** @type {import('@typescript-eslint/types').TSESTree.Node} */ (\n node.parent\n ).parent,\n ),\n ...getNamesFromNode(\n /** @type {import('@typescript-eslint/types').TSESTree.Node} */\n (node.key),\n ),\n ];\n case 'ClassDeclaration':\n case 'ClassExpression':\n case 'FunctionDeclaration':\n case 'FunctionExpression':\n case 'TSModuleDeclaration':\n case 'TSMethodSignature':\n case 'TSDeclareFunction':\n case 'TSEnumDeclaration':\n case 'TSEnumMember':\n case 'TSInterfaceDeclaration':\n case 'TSTypeAliasDeclaration':\n return getNamesFromNode(\n /** @type {import('@typescript-eslint/types').TSESTree.ClassDeclaration} */\n (node).id,\n );\n case 'Identifier':\n return [\n node.name,\n ];\n case 'Property':\n return getNamesFromNode(\n /** @type {import('@typescript-eslint/types').TSESTree.Node} */\n (node.key),\n );\n case 'VariableDeclaration':\n return getNamesFromNode(\n /** @type {import('@typescript-eslint/types').TSESTree.Node} */\n (node.declarations[0]),\n );\n case 'VariableDeclarator':\n return [\n ...getNamesFromNode(\n /** @type {import('@typescript-eslint/types').TSESTree.Node} */\n (node.id),\n ),\n ...getNamesFromNode(\n /** @type {import('@typescript-eslint/types').TSESTree.Node} */\n (node.init),\n ),\n ].filter(Boolean);\n default:\n return [];\n }\n};\n/* eslint-enable complexity -- Temporary */\n\nexport default iterateJsdoc(({\n context,\n jsdoc,\n node,\n report,\n utils,\n}) => {\n const /** @type {{aliases: {[key: string]: string[]}, excludedTags: string[], uselessWords: string[]}} */ {\n aliases = defaultAliases,\n excludedTags = [],\n uselessWords = defaultUselessWords,\n } = context.options[0] || {};\n const nodeNames = getNamesFromNode(node);\n\n /**\n * @param {string} text\n * @param {string} extraName\n * @returns {boolean}\n */\n const descriptionIsRedundant = (text, extraName = '') => {\n const textTrimmed = text.trim();\n return Boolean(textTrimmed) && !areDocsInformative(textTrimmed, [\n extraName, nodeNames,\n ].filter(Boolean).join(' '), {\n aliases,\n uselessWords,\n });\n };\n\n const {\n description,\n lastDescriptionLine,\n } = utils.getDescription();\n let descriptionReported = false;\n\n for (const tag of jsdoc.tags) {\n if (excludedTags.includes(tag.tag)) {\n continue;\n }\n\n if (descriptionIsRedundant(tag.description, tag.name)) {\n utils.reportJSDoc(\n 'This tag description only repeats the name it describes.',\n tag,\n );\n }\n\n descriptionReported ||= tag.description === description &&\n /** @type {import('comment-parser').Spec & {line: import('../iterateJsdoc.js').Integer}} */\n (tag).line === lastDescriptionLine;\n }\n\n if (!descriptionReported && descriptionIsRedundant(description)) {\n report('This description only repeats the name it describes.');\n }\n}, {\n iterateAllJsdocs: true,\n meta: {\n docs: {\n description:\n 'This rule reports doc comments that only restate their attached name.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/informative-docs.md#repos-sticky-header',\n },\n schema: [\n {\n additionalProperties: false,\n properties: {\n aliases: {\n patternProperties: {\n '.*': {\n items: {\n type: 'string',\n },\n type: 'array',\n },\n },\n },\n excludedTags: {\n items: {\n type: 'string',\n },\n type: 'array',\n },\n uselessWords: {\n items: {\n type: 'string',\n },\n type: 'array',\n },\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n});\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,mBAAA,GAAAD,OAAA;AAE8B,SAAAD,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAE9B,MAAMG,cAAc,GAAG;EACrBC,CAAC,EAAE,CACD,IAAI,EAAE,KAAK;AAEf,CAAC;AAED,MAAMC,mBAAmB,GAAG,CAC1B,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,CACvC;;AAED;;AAEA;AACA;AACA;AACA;AACA,MAAMC,gBAAgB,GAAIC,IAAI,IAAK;EACjC,QAAQA,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAEC,IAAI;IAClB,KAAK,kBAAkB;IACvB,KAAK,kBAAkB;IACvB,KAAK,oBAAoB;IACzB,KAAK,4BAA4B;IACjC,KAAK,4BAA4B;IACjC,KAAK,8BAA8B;MACjC,OAAO,CACL,GAAGF,gBAAgB,EACjB,+DACEC,IAAI,CAACE,MAAM,CACXA,MACJ,CAAC,EACD,GAAGH,gBAAgB,EACjB;MACCC,IAAI,CAACG,GACR,CAAC,CACF;IACH,KAAK,kBAAkB;IACvB,KAAK,iBAAiB;IACtB,KAAK,qBAAqB;IAC1B,KAAK,oBAAoB;IACzB,KAAK,qBAAqB;IAC1B,KAAK,mBAAmB;IACxB,KAAK,mBAAmB;IACxB,KAAK,mBAAmB;IACxB,KAAK,cAAc;IACnB,KAAK,wBAAwB;IAC7B,KAAK,wBAAwB;MAC3B,
|
|
1
|
+
{"version":3,"file":"informativeDocs.cjs","names":["_iterateJsdoc","_interopRequireDefault","require","_areDocsInformative","obj","__esModule","default","defaultAliases","a","defaultUselessWords","getNamesFromNode","node","type","parent","key","declaration","id","name","declarations","init","filter","Boolean","_default","exports","iterateJsdoc","context","jsdoc","report","utils","aliases","excludedTags","uselessWords","options","nodeNames","descriptionIsRedundant","text","extraName","textTrimmed","trim","areDocsInformative","join","description","lastDescriptionLine","getDescription","descriptionReported","tag","tags","includes","reportJSDoc","line","iterateAllJsdocs","meta","docs","url","schema","additionalProperties","properties","patternProperties","items","module"],"sources":["../../src/rules/informativeDocs.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc.js';\nimport {\n areDocsInformative,\n} from 'are-docs-informative';\n\nconst defaultAliases = {\n a: [\n 'an', 'our',\n ],\n};\n\nconst defaultUselessWords = [\n 'a', 'an', 'i', 'in', 'of', 's', 'the',\n];\n\n/* eslint-disable complexity -- Temporary */\n\n/**\n * @param {import('eslint').Rule.Node|import('@typescript-eslint/types').TSESTree.Node|null|undefined} node\n * @returns {string[]}\n */\nconst getNamesFromNode = (node) => {\n switch (node?.type) {\n case 'AccessorProperty':\n case 'MethodDefinition':\n case 'PropertyDefinition':\n case 'TSAbstractAccessorProperty':\n case 'TSAbstractMethodDefinition':\n case 'TSAbstractPropertyDefinition':\n return [\n ...getNamesFromNode(\n /** @type {import('@typescript-eslint/types').TSESTree.Node} */ (\n node.parent\n ).parent,\n ),\n ...getNamesFromNode(\n /** @type {import('@typescript-eslint/types').TSESTree.Node} */\n (node.key),\n ),\n ];\n\n case 'ExportDefaultDeclaration':\n case 'ExportNamedDeclaration':\n return getNamesFromNode(\n /** @type {import('@typescript-eslint/types').TSESTree.ExportNamedDeclaration} */\n (node).declaration\n );\n case 'ClassDeclaration':\n case 'ClassExpression':\n case 'FunctionDeclaration':\n case 'FunctionExpression':\n case 'TSModuleDeclaration':\n case 'TSMethodSignature':\n case 'TSDeclareFunction':\n case 'TSEnumDeclaration':\n case 'TSEnumMember':\n case 'TSInterfaceDeclaration':\n case 'TSTypeAliasDeclaration':\n return getNamesFromNode(\n /** @type {import('@typescript-eslint/types').TSESTree.ClassDeclaration} */\n (node).id,\n );\n case 'Identifier':\n return [\n node.name,\n ];\n case 'Property':\n return getNamesFromNode(\n /** @type {import('@typescript-eslint/types').TSESTree.Node} */\n (node.key),\n );\n case 'VariableDeclaration':\n return getNamesFromNode(\n /** @type {import('@typescript-eslint/types').TSESTree.Node} */\n (node.declarations[0]),\n );\n case 'VariableDeclarator':\n return [\n ...getNamesFromNode(\n /** @type {import('@typescript-eslint/types').TSESTree.Node} */\n (node.id),\n ),\n ...getNamesFromNode(\n /** @type {import('@typescript-eslint/types').TSESTree.Node} */\n (node.init),\n ),\n ].filter(Boolean);\n default:\n return [];\n }\n};\n/* eslint-enable complexity -- Temporary */\n\nexport default iterateJsdoc(({\n context,\n jsdoc,\n node,\n report,\n utils,\n}) => {\n const /** @type {{aliases: {[key: string]: string[]}, excludedTags: string[], uselessWords: string[]}} */ {\n aliases = defaultAliases,\n excludedTags = [],\n uselessWords = defaultUselessWords,\n } = context.options[0] || {};\n const nodeNames = getNamesFromNode(node);\n\n /**\n * @param {string} text\n * @param {string} extraName\n * @returns {boolean}\n */\n const descriptionIsRedundant = (text, extraName = '') => {\n const textTrimmed = text.trim();\n return Boolean(textTrimmed) && !areDocsInformative(textTrimmed, [\n extraName, nodeNames,\n ].filter(Boolean).join(' '), {\n aliases,\n uselessWords,\n });\n };\n\n const {\n description,\n lastDescriptionLine,\n } = utils.getDescription();\n let descriptionReported = false;\n\n for (const tag of jsdoc.tags) {\n if (excludedTags.includes(tag.tag)) {\n continue;\n }\n\n if (descriptionIsRedundant(tag.description, tag.name)) {\n utils.reportJSDoc(\n 'This tag description only repeats the name it describes.',\n tag,\n );\n }\n\n descriptionReported ||= tag.description === description &&\n /** @type {import('comment-parser').Spec & {line: import('../iterateJsdoc.js').Integer}} */\n (tag).line === lastDescriptionLine;\n }\n\n if (!descriptionReported && descriptionIsRedundant(description)) {\n report('This description only repeats the name it describes.');\n }\n}, {\n iterateAllJsdocs: true,\n meta: {\n docs: {\n description:\n 'This rule reports doc comments that only restate their attached name.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/informative-docs.md#repos-sticky-header',\n },\n schema: [\n {\n additionalProperties: false,\n properties: {\n aliases: {\n patternProperties: {\n '.*': {\n items: {\n type: 'string',\n },\n type: 'array',\n },\n },\n },\n excludedTags: {\n items: {\n type: 'string',\n },\n type: 'array',\n },\n uselessWords: {\n items: {\n type: 'string',\n },\n type: 'array',\n },\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n});\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,mBAAA,GAAAD,OAAA;AAE8B,SAAAD,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAE9B,MAAMG,cAAc,GAAG;EACrBC,CAAC,EAAE,CACD,IAAI,EAAE,KAAK;AAEf,CAAC;AAED,MAAMC,mBAAmB,GAAG,CAC1B,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,CACvC;;AAED;;AAEA;AACA;AACA;AACA;AACA,MAAMC,gBAAgB,GAAIC,IAAI,IAAK;EACjC,QAAQA,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAEC,IAAI;IAClB,KAAK,kBAAkB;IACvB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E;AACF,CAAC,EAAE;EACDuB,gBAAgB,EAAE,IAAI;EACtBC,IAAI,EAAE;IACJC,IAAI,EAAE;MACJX,WAAW,EACT,uEAAuE;MACzEY,GAAG,EAAE;IACP,CAAC;IACDC,MAAM,EAAE,CACN;MACEC,oBAAoB,EAAE,KAAK;MAC3BC,UAAU,EAAE;QACV3B,OAAO,EAAE;UACP4B,iBAAiB,EAAE;YACjB,IAAI,EAAE;cACJC,KAAK,EAAE;gBACL9C,IAAI,EAAE;cACR,CAAC;cACDA,IAAI,EAAE;YACR;UACF;QACF,CAAC;QACDkB,YAAY,EAAE;UACZ4B,KAAK,EAAE;YACL9C,IAAI,EAAE;UACR,CAAC;UACDA,IAAI,EAAE;QACR,CAAC;QACDmB,YAAY,EAAE;UACZ2B,KAAK,EAAE;YACL9C,IAAI,EAAE;UACR,CAAC;UACDA,IAAI,EAAE;QACR;MACF,CAAC;MACDA,IAAI,EAAE;IACR,CAAC,CACF;IACDA,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAAA+C,MAAA,CAAApC,OAAA,GAAAA,OAAA,CAAAjB,OAAA"}
|
package/package.json
CHANGED
|
@@ -5,25 +5,25 @@
|
|
|
5
5
|
"url": "http://gajus.com"
|
|
6
6
|
},
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@es-joy/jsdoccomment": "~0.
|
|
8
|
+
"@es-joy/jsdoccomment": "~0.42.0",
|
|
9
9
|
"are-docs-informative": "^0.0.2",
|
|
10
10
|
"comment-parser": "1.4.1",
|
|
11
11
|
"debug": "^4.3.4",
|
|
12
12
|
"escape-string-regexp": "^4.0.0",
|
|
13
13
|
"esquery": "^1.5.0",
|
|
14
14
|
"is-builtin-module": "^3.2.1",
|
|
15
|
-
"semver": "^7.
|
|
15
|
+
"semver": "^7.6.0",
|
|
16
16
|
"spdx-expression-parse": "^4.0.0"
|
|
17
17
|
},
|
|
18
18
|
"description": "JSDoc linting rules for ESLint.",
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@babel/cli": "^7.23.
|
|
21
|
-
"@babel/core": "^7.23.
|
|
22
|
-
"@babel/eslint-parser": "^7.23.
|
|
23
|
-
"@babel/node": "^7.
|
|
20
|
+
"@babel/cli": "^7.23.9",
|
|
21
|
+
"@babel/core": "^7.23.9",
|
|
22
|
+
"@babel/eslint-parser": "^7.23.10",
|
|
23
|
+
"@babel/node": "^7.23.9",
|
|
24
24
|
"@babel/plugin-syntax-class-properties": "^7.12.13",
|
|
25
25
|
"@babel/plugin-transform-flow-strip-types": "^7.23.3",
|
|
26
|
-
"@babel/preset-env": "^7.23.
|
|
26
|
+
"@babel/preset-env": "^7.23.9",
|
|
27
27
|
"@es-joy/escodegen": "^3.5.1",
|
|
28
28
|
"@es-joy/jsdoc-eslint-parser": "^0.21.1",
|
|
29
29
|
"@hkdobrev/run-if-changed": "^0.3.1",
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
"@types/json-schema": "^7.0.15",
|
|
39
39
|
"@types/lodash.defaultsdeep": "^4.6.9",
|
|
40
40
|
"@types/mocha": "^10.0.6",
|
|
41
|
-
"@types/node": "^20.11.
|
|
41
|
+
"@types/node": "^20.11.16",
|
|
42
42
|
"@types/semver": "^7.5.6",
|
|
43
43
|
"@types/spdx-expression-parse": "^3.0.5",
|
|
44
|
-
"@typescript-eslint/parser": "^6.
|
|
44
|
+
"@typescript-eslint/parser": "^6.21.0",
|
|
45
45
|
"babel-plugin-add-module-exports": "^1.0.4",
|
|
46
46
|
"babel-plugin-istanbul": "^6.1.1",
|
|
47
47
|
"c8": "^9.1.0",
|
|
@@ -51,14 +51,14 @@
|
|
|
51
51
|
"decamelize": "^5.0.1",
|
|
52
52
|
"eslint": "9.0.0-alpha.0",
|
|
53
53
|
"eslint-config-canonical": "~42.8.1",
|
|
54
|
-
"espree": "^
|
|
54
|
+
"espree": "^10.0.0",
|
|
55
55
|
"gitdown": "^3.1.5",
|
|
56
56
|
"glob": "^10.3.10",
|
|
57
57
|
"globals": "^13.24.0",
|
|
58
|
-
"husky": "^
|
|
58
|
+
"husky": "^9.0.10",
|
|
59
59
|
"jsdoc-type-pratt-parser": "^4.0.0",
|
|
60
60
|
"json-schema": "^0.4.0",
|
|
61
|
-
"lint-staged": "^15.2.
|
|
61
|
+
"lint-staged": "^15.2.2",
|
|
62
62
|
"lodash.defaultsdeep": "^4.6.1",
|
|
63
63
|
"mocha": "^10.2.0",
|
|
64
64
|
"open-editor": "^3.0.0",
|
|
@@ -141,5 +141,5 @@
|
|
|
141
141
|
"test-cov": "cross-env TIMING=1 c8 --reporter text npm run test-no-cov",
|
|
142
142
|
"test-index": "npm run test-no-cov -- test/rules/index.js"
|
|
143
143
|
},
|
|
144
|
-
"version": "48.0.
|
|
144
|
+
"version": "48.0.6"
|
|
145
145
|
}
|
|
@@ -38,6 +38,13 @@ const getNamesFromNode = (node) => {
|
|
|
38
38
|
(node.key),
|
|
39
39
|
),
|
|
40
40
|
];
|
|
41
|
+
|
|
42
|
+
case 'ExportDefaultDeclaration':
|
|
43
|
+
case 'ExportNamedDeclaration':
|
|
44
|
+
return getNamesFromNode(
|
|
45
|
+
/** @type {import('@typescript-eslint/types').TSESTree.ExportNamedDeclaration} */
|
|
46
|
+
(node).declaration
|
|
47
|
+
);
|
|
41
48
|
case 'ClassDeclaration':
|
|
42
49
|
case 'ClassExpression':
|
|
43
50
|
case 'FunctionDeclaration':
|