eslint-plugin-jsdoc 56.1.2 → 57.0.1
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 +10 -11
- package/dist/cjs/index-cjs.d.ts +10 -0
- package/dist/cjs/iterateJsdoc.d.ts +21 -5
- package/dist/exportParser.cjs +0 -6
- package/dist/exportParser.cjs.map +1 -1
- package/dist/index-cjs.cjs +108 -3
- package/dist/index-cjs.cjs.map +1 -1
- package/dist/index-cjs.d.ts +10 -0
- package/dist/index-esm.cjs +36 -10
- package/dist/index-esm.cjs.map +1 -1
- package/dist/index-esm.d.ts +29 -3
- package/dist/index.cjs +142 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +39 -3
- package/dist/iterateJsdoc.cjs +14 -8
- package/dist/iterateJsdoc.cjs.map +1 -1
- package/dist/iterateJsdoc.d.ts +21 -5
- package/dist/jsdocUtils.cjs +0 -3
- package/dist/jsdocUtils.cjs.map +1 -1
- package/dist/rules/checkParamNames.cjs +1 -1
- package/dist/rules/checkParamNames.cjs.map +1 -1
- package/dist/rules/checkPropertyNames.cjs +1 -1
- package/dist/rules/checkPropertyNames.cjs.map +1 -1
- package/dist/rules/informativeDocs.cjs +0 -3
- package/dist/rules/informativeDocs.cjs.map +1 -1
- package/dist/rules/matchName.cjs +0 -1
- package/dist/rules/matchName.cjs.map +1 -1
- package/dist/rules/noMultiAsterisks.cjs +0 -2
- package/dist/rules/noMultiAsterisks.cjs.map +1 -1
- package/dist/rules/requireReturnsCheck.cjs +0 -2
- package/dist/rules/requireReturnsCheck.cjs.map +1 -1
- package/dist/rules/sortTags.cjs +0 -2
- package/dist/rules/sortTags.cjs.map +1 -1
- package/dist/rules/tagLines.cjs +0 -2
- package/dist/rules/tagLines.cjs.map +1 -1
- package/package.json +2 -1
- package/src/exportParser.js +0 -6
- package/src/index-cjs.js +125 -0
- package/src/index-esm.js +43 -13
- package/src/index.js +165 -12
- package/src/iterateJsdoc.js +17 -8
- package/src/jsdocUtils.js +0 -3
- package/src/rules/checkParamNames.js +1 -1
- package/src/rules/checkPropertyNames.js +1 -1
- package/src/rules/informativeDocs.js +0 -3
- package/src/rules/matchName.js +0 -1
- package/src/rules/noMultiAsterisks.js +0 -1
- package/src/rules/requireReturnsCheck.js +0 -1
- package/src/rules/sortTags.js +0 -2
- package/src/rules/tagLines.js +0 -1
package/README.md
CHANGED
|
@@ -101,16 +101,6 @@ export default [
|
|
|
101
101
|
'type',
|
|
102
102
|
],
|
|
103
103
|
},
|
|
104
|
-
throws: {
|
|
105
|
-
required: [
|
|
106
|
-
'type',
|
|
107
|
-
],
|
|
108
|
-
},
|
|
109
|
-
yields: {
|
|
110
|
-
required: [
|
|
111
|
-
'type',
|
|
112
|
-
],
|
|
113
|
-
},
|
|
114
104
|
},
|
|
115
105
|
*/
|
|
116
106
|
}
|
|
@@ -120,7 +110,13 @@ export default [
|
|
|
120
110
|
|
|
121
111
|
A `plugins` property can also be supplied to merge with the resulting `jsdoc` plugin.
|
|
122
112
|
|
|
123
|
-
Other config properties such as `files`, `ignores`, etc. are also copied over
|
|
113
|
+
Other config properties such as `files`, `ignores`, etc. are also copied over,
|
|
114
|
+
though noting that if the specified config produces an array, they will not
|
|
115
|
+
currently function.
|
|
116
|
+
|
|
117
|
+
There is also a `extraRuleDefinitions.forbid` option, the details of which are
|
|
118
|
+
explained in the [Advanced](./docs/advanced.md#forbidding-structures) docs
|
|
119
|
+
(under creating your own rules and forbidding structures).
|
|
124
120
|
|
|
125
121
|
<a name="user-content-eslint-plugin-jsdoc-configuration-flat-config-declarative"></a>
|
|
126
122
|
<a name="eslint-plugin-jsdoc-configuration-flat-config-declarative"></a>
|
|
@@ -450,6 +446,7 @@ non-default-recommended fixer).
|
|
|
450
446
|
|||[require-file-overview](./docs/rules/require-file-overview.md#readme)|By default, requires a single `@file` tag at the beginning of each linted file|
|
|
451
447
|
||:wrench:|[require-hyphen-before-param-description](./docs/rules/require-hyphen-before-param-description.md#readme)|Requires a hyphen before `@param` descriptions (and optionally before `@property` descriptions)|
|
|
452
448
|
|:heavy_check_mark:|:wrench:|[require-jsdoc](./docs/rules/require-jsdoc.md#readme)|Checks for presence of jsdoc comments, on functions and potentially other contexts (optionally limited to exports).|
|
|
449
|
+
|:heavy_check_mark:||[require-next-type](./docs/rules/require-next-type.md#readme)|Requires a type on the (non-standard) `@next` tag.|
|
|
453
450
|
|:heavy_check_mark:|:wrench:|[require-param](./docs/rules/require-param.md#readme)|Requires that all function parameters are documented with a `@param` tag.|
|
|
454
451
|
|:heavy_check_mark:||[require-param-description](./docs/rules/require-param-description.md#readme)|Requires that each `@param` tag has a `description` value.|
|
|
455
452
|
|:heavy_check_mark:||[require-param-name](./docs/rules/require-param-name.md#readme)|Requires that all `@param` tags have names.|
|
|
@@ -464,8 +461,10 @@ non-default-recommended fixer).
|
|
|
464
461
|
|:heavy_check_mark: (off in TS)||[require-returns-type](./docs/rules/require-returns-type.md#readme)|Requires that `@returns` tag has a type value (in curly brackets).|
|
|
465
462
|
| || [require-template](./docs/rules/require-template.md#readme) | Requires `@template` tags be present when type parameters are used.|
|
|
466
463
|
|||[require-throws](./docs/rules/require-throws.md#readme)|Requires that throw statements are documented|
|
|
464
|
+
|:heavy_check_mark:||[require-throws-type](./docs/rules/require-throws-type.md#readme)|Requires a type on the `@throws` tag.|
|
|
467
465
|
|:heavy_check_mark:||[require-yields](./docs/rules/require-yields.md#readme)|Requires that yields are documented|
|
|
468
466
|
|:heavy_check_mark:||[require-yields-check](./docs/rules/require-yields-check.md#readme)|Ensures that if a `@yields` is present that a `yield` (or `yield` with a value) is present in the function body (or that if a `@next` is present that there is a `yield` with a return value present)|
|
|
467
|
+
|:heavy_check_mark:||[require-yields-type](./docs/rules/require-yields-type.md#readme)|Requires a type on the `@yields` tag.|
|
|
469
468
|
|||[sort-tags](./docs/rules/sort-tags.md#readme)|Sorts tags by a specified sequence according to tag name, optionally adding line breaks between tag groups|
|
|
470
469
|
|:heavy_check_mark:|:wrench:|[tag-lines](./docs/rules/tag-lines.md#readme)|Enforces lines (or no lines) between tags|
|
|
471
470
|
||:wrench:|[text-escaping](./docs/rules/text-escaping.md#readme)|This rule can auto-escape certain characters that are input within block and tag descriptions|
|
package/dist/cjs/index-cjs.d.ts
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
export function buildForbidRuleDefinition({ contextName, contexts, description, url, }: {
|
|
2
|
+
contexts: (string | {
|
|
3
|
+
comment: string;
|
|
4
|
+
context: string;
|
|
5
|
+
message: string;
|
|
6
|
+
})[];
|
|
7
|
+
description?: string;
|
|
8
|
+
contextName?: string;
|
|
9
|
+
url?: string;
|
|
10
|
+
}): import("@eslint/core").RuleDefinition<import("@eslint/core").RuleDefinitionTypeOptions>;
|
|
1
11
|
export default index;
|
|
2
12
|
export type ConfigGroups = "recommended" | "stylistic" | "contents" | "logical" | "requirements";
|
|
3
13
|
export type ConfigVariants = "" | "-typescript" | "-typescript-flavor";
|
|
@@ -268,8 +268,14 @@ export type Settings = {
|
|
|
268
268
|
mode: import("./jsdocUtils.js").ParserMode;
|
|
269
269
|
preferredTypes: PreferredTypes;
|
|
270
270
|
structuredTags: StructuredTags;
|
|
271
|
-
[name: string]: any;
|
|
272
271
|
contexts?: Context[];
|
|
272
|
+
augmentsExtendsReplacesDocs?: boolean;
|
|
273
|
+
ignoreReplacesDocs?: boolean;
|
|
274
|
+
implementsReplacesDocs?: boolean;
|
|
275
|
+
overrideReplacesDocs?: boolean;
|
|
276
|
+
ignoreInternal?: boolean;
|
|
277
|
+
ignorePrivate?: boolean;
|
|
278
|
+
exemptDestructuredRootsFromChecks?: boolean;
|
|
273
279
|
};
|
|
274
280
|
export type JSDocSettings = {
|
|
275
281
|
settings?: {
|
|
@@ -315,7 +321,7 @@ export type JsdocVisitorBasic = (arg: {
|
|
|
315
321
|
makeReport?: MakeReport;
|
|
316
322
|
settings: Settings;
|
|
317
323
|
utils: BasicUtils;
|
|
318
|
-
}) =>
|
|
324
|
+
}) => void;
|
|
319
325
|
export type JsdocVisitor = (arg: {
|
|
320
326
|
context: import("eslint").Rule.RuleContext;
|
|
321
327
|
sourceCode: import("eslint").SourceCode;
|
|
@@ -336,7 +342,7 @@ export type JsdocVisitor = (arg: {
|
|
|
336
342
|
makeReport?: MakeReport;
|
|
337
343
|
settings: Settings;
|
|
338
344
|
utils: Utils;
|
|
339
|
-
}) =>
|
|
345
|
+
}) => void;
|
|
340
346
|
export type NonCommentArgs = {
|
|
341
347
|
node: Node & {
|
|
342
348
|
range: [number, number];
|
|
@@ -356,6 +362,10 @@ export type RuleConfig = {
|
|
|
356
362
|
* Whether to force a `contexts` check
|
|
357
363
|
*/
|
|
358
364
|
contextSelected?: true | undefined;
|
|
365
|
+
/**
|
|
366
|
+
* Modify the rule's context object
|
|
367
|
+
*/
|
|
368
|
+
modifyContext?: ((context: import("eslint").Rule.RuleContext) => import("eslint").Rule.RuleContext) | undefined;
|
|
359
369
|
/**
|
|
360
370
|
* Whether to iterate all JSDoc blocks by default
|
|
361
371
|
* regardless of context
|
|
@@ -428,8 +438,14 @@ export type RuleConfig = {
|
|
|
428
438
|
* mode: import('./jsdocUtils.js').ParserMode,
|
|
429
439
|
* preferredTypes: PreferredTypes,
|
|
430
440
|
* structuredTags: StructuredTags,
|
|
431
|
-
* [
|
|
432
|
-
*
|
|
441
|
+
* contexts?: Context[],
|
|
442
|
+
* augmentsExtendsReplacesDocs?: boolean,
|
|
443
|
+
* ignoreReplacesDocs?: boolean,
|
|
444
|
+
* implementsReplacesDocs?: boolean,
|
|
445
|
+
* overrideReplacesDocs?: boolean,
|
|
446
|
+
* ignoreInternal?: boolean,
|
|
447
|
+
* ignorePrivate?: boolean,
|
|
448
|
+
* exemptDestructuredRootsFromChecks?: boolean,
|
|
433
449
|
* }} Settings
|
|
434
450
|
*/
|
|
435
451
|
/**
|
package/dist/exportParser.cjs
CHANGED
|
@@ -105,8 +105,6 @@ const getIdentifier = function (node, globals, scope, opts) {
|
|
|
105
105
|
/** @type {CreateSymbol} */
|
|
106
106
|
let createSymbol; // eslint-disable-line prefer-const
|
|
107
107
|
|
|
108
|
-
/* eslint-disable complexity -- Temporary */
|
|
109
|
-
|
|
110
108
|
/**
|
|
111
109
|
* @typedef {{
|
|
112
110
|
* simpleIdentifier?: boolean
|
|
@@ -122,7 +120,6 @@ let createSymbol; // eslint-disable-line prefer-const
|
|
|
122
120
|
* @returns {CreatedNode|null}
|
|
123
121
|
*/
|
|
124
122
|
const getSymbol = function (node, globals, scope, opt) {
|
|
125
|
-
/* eslint-enable complexity -- Temporary */
|
|
126
123
|
const opts = opt || {};
|
|
127
124
|
/* c8 ignore next */
|
|
128
125
|
switch (node.type) {
|
|
@@ -374,8 +371,6 @@ const initVariables = function (node, globals, opts) {
|
|
|
374
371
|
}
|
|
375
372
|
};
|
|
376
373
|
|
|
377
|
-
/* eslint-disable complexity -- Temporary */
|
|
378
|
-
|
|
379
374
|
/**
|
|
380
375
|
* Populates variable maps using AST
|
|
381
376
|
* @param {import('eslint').Rule.Node|import('@typescript-eslint/types').TSESTree.Node} node
|
|
@@ -385,7 +380,6 @@ const initVariables = function (node, globals, opts) {
|
|
|
385
380
|
* @returns {boolean}
|
|
386
381
|
*/
|
|
387
382
|
const mapVariables = function (node, globals, opt, isExport) {
|
|
388
|
-
/* eslint-enable complexity -- Temporary */
|
|
389
383
|
/* c8 ignore next */
|
|
390
384
|
const opts = opt || {};
|
|
391
385
|
/* c8 ignore next */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exportParser.cjs","names":["_jsdoccomment","require","_debug","_interopRequireDefault","e","__esModule","default","debug","debugModule","createNode","props","getSymbolValue","symbol","type","value","getIdentifier","node","globals","scope","opts","simpleIdentifier","identifierLiteral","name","block","createSymbol","getSymbol","opt","val","prototype","left","right","method","body","key","parent","obj","object","propertySymbol","property","computed","propertyValue","prop","properties","includes","propVal","createBlockSymbol","isGlobal","window","special","nde","id","valueSymbol","initVariables","declaration","expression","childNode","declarations","initWindow","kind","mapVariables","isExport","exported","ANONYMOUS_DEFAULT","specifier","specifiers","local","ancestorsOnly","Boolean","init","findNode","cache","blockCache","slice","push","propval","Object","values","Array","isArray","some","exportTypes","Set","ignorableNestedTypes","getExportAncestor","idx","ignorableIfDeep","has","canBeExportedByAncestorType","canExportChildrenType","isExportByAncestor","findExportedNode","pval","isNodeExported","moduleExports","module","exports","initModuleExports","esm","parseRecursive","globalVars","parse","ast","accessibilityNodes","isPrivate","accessibility","undefined","isUncommentedExport","sourceCode","settings","exportNode","findJSDocComment","parseResult","_default"],"sources":["../src/exportParser.js"],"sourcesContent":["import {\n findJSDocComment,\n} from '@es-joy/jsdoccomment';\nimport debugModule from 'debug';\n\nconst debug = debugModule('requireExportJsdoc');\n\n/**\n * @typedef {{\n * value: string\n * }} ValueObject\n */\n\n/**\n * @typedef {{\n * type?: string,\n * value?: ValueObject|import('eslint').Rule.Node|import('@typescript-eslint/types').TSESTree.Node,\n * props: {\n * [key: string]: CreatedNode|null,\n * },\n * special?: true,\n * globalVars?: CreatedNode,\n * exported?: boolean,\n * ANONYMOUS_DEFAULT?: import('eslint').Rule.Node\n * }} CreatedNode\n */\n\n/**\n * @returns {CreatedNode}\n */\nconst createNode = function () {\n return {\n props: {},\n };\n};\n\n/**\n * @param {CreatedNode|null} symbol\n * @returns {string|null}\n */\nconst getSymbolValue = function (symbol) {\n /* c8 ignore next 3 */\n if (!symbol) {\n return null;\n }\n\n /* c8 ignore else */\n if (symbol.type === 'literal') {\n return /** @type {ValueObject} */ (symbol.value).value;\n }\n /* c8 ignore next 2 */\n // eslint-disable-next-line @stylistic/padding-line-between-statements -- c8\n return null;\n};\n\n/**\n *\n * @param {import('estree').Identifier} node\n * @param {CreatedNode} globals\n * @param {CreatedNode} scope\n * @param {SymbolOptions} opts\n * @returns {CreatedNode|null}\n */\nconst getIdentifier = function (node, globals, scope, opts) {\n if (opts.simpleIdentifier) {\n // Type is Identier for noncomputed properties\n const identifierLiteral = createNode();\n identifierLiteral.type = 'literal';\n identifierLiteral.value = {\n value: node.name,\n };\n\n return identifierLiteral;\n }\n\n /* c8 ignore next */\n const block = scope || globals;\n\n // As scopes are not currently supported, they are not traversed upwards recursively\n if (block.props[node.name]) {\n return block.props[node.name];\n }\n\n // Seems this will only be entered once scopes added and entered\n /* c8 ignore next 3 */\n if (globals.props[node.name]) {\n return globals.props[node.name];\n }\n\n return null;\n};\n\n/**\n * @callback CreateSymbol\n * @param {import('eslint').Rule.Node|null} node\n * @param {CreatedNode} globals\n * @param {import('eslint').Rule.Node|import('@typescript-eslint/types').TSESTree.Node|null} value\n * @param {CreatedNode} [scope]\n * @param {boolean|SymbolOptions} [isGlobal]\n * @returns {CreatedNode|null}\n */\n\n/** @type {CreateSymbol} */\nlet createSymbol; // eslint-disable-line prefer-const\n\n/* eslint-disable complexity -- Temporary */\n\n/**\n * @typedef {{\n * simpleIdentifier?: boolean\n * }} SymbolOptions\n */\n\n/**\n *\n * @param {import('eslint').Rule.Node|import('@typescript-eslint/types').TSESTree.Node} node\n * @param {CreatedNode} globals\n * @param {CreatedNode} scope\n * @param {SymbolOptions} [opt]\n * @returns {CreatedNode|null}\n */\nconst getSymbol = function (node, globals, scope, opt) {\n /* eslint-enable complexity -- Temporary */\n const opts = opt || {};\n /* c8 ignore next */\n switch (node.type) {\n /* c8 ignore next 4 -- No longer needed? */\n case 'ArrowFunctionExpression':\n\n // Fallthrough\n case 'ClassDeclaration':\n\n case 'FunctionDeclaration':\n\n case 'FunctionExpression':\n case 'TSEnumDeclaration':\n case 'TSInterfaceDeclaration':\n case 'TSTypeAliasDeclaration': {\n const val = createNode();\n val.props.prototype = createNode();\n val.props.prototype.type = 'object';\n val.type = 'object';\n val.value = node;\n\n return val;\n }\n\n case 'AssignmentExpression': {\n return createSymbol(\n /** @type {import('eslint').Rule.Node} */\n (node.left),\n globals,\n /** @type {import('eslint').Rule.Node} */\n (node.right),\n scope,\n opts,\n );\n }\n\n case 'ClassBody': {\n const val = createNode();\n for (const method of node.body) {\n // StaticBlock\n if (!('key' in method)) {\n continue;\n }\n\n val.props[\n /** @type {import('estree').Identifier} */ (\n /** @type {import('estree').MethodDefinition} */ (\n method\n ).key\n ).name\n ] = createNode();\n /** @type {{[key: string]: CreatedNode}} */ (val.props)[\n /** @type {import('estree').Identifier} */ (\n /** @type {import('estree').MethodDefinition} */ (\n method\n ).key\n ).name\n ].type = 'object';\n /** @type {{[key: string]: CreatedNode}} */ (val.props)[\n /** @type {import('estree').Identifier} */ (\n /** @type {import('estree').MethodDefinition} */ (\n method\n ).key\n ).name\n ].value = /** @type {import('eslint').Rule.Node} */ (\n /** @type {import('estree').MethodDefinition} */ (method).value\n );\n }\n\n val.type = 'object';\n val.value = node.parent;\n\n return val;\n }\n\n case 'ClassExpression': {\n return getSymbol(\n /** @type {import('eslint').Rule.Node} */\n (node.body),\n globals,\n scope,\n opts,\n );\n }\n\n case 'Identifier': {\n return getIdentifier(node, globals, scope, opts);\n }\n\n case 'Literal': {\n const val = createNode();\n val.type = 'literal';\n val.value = node;\n\n return val;\n }\n\n case 'MemberExpression': {\n const obj = getSymbol(\n /** @type {import('eslint').Rule.Node} */\n (node.object),\n globals,\n scope,\n opts,\n );\n const propertySymbol = getSymbol(\n /** @type {import('eslint').Rule.Node} */\n (node.property),\n globals,\n scope,\n {\n simpleIdentifier: !node.computed,\n },\n );\n const propertyValue = getSymbolValue(propertySymbol);\n\n /* c8 ignore else */\n if (obj && propertyValue && obj.props[propertyValue]) {\n const block = obj.props[propertyValue];\n\n return block;\n }\n /* c8 ignore next 11 */\n /*\n if (opts.createMissingProps && propertyValue) {\n obj.props[propertyValue] = createNode();\n\n return obj.props[propertyValue];\n }\n */\n // eslint-disable-next-line @stylistic/padding-line-between-statements -- c8\n debug(`MemberExpression: Missing property ${\n /** @type {import('estree').PrivateIdentifier} */ (node.property).name\n }`);\n /* c8 ignore next 2 */\n return null;\n }\n\n case 'ObjectExpression': {\n const val = createNode();\n val.type = 'object';\n for (const prop of node.properties) {\n if ([\n // @babel/eslint-parser\n 'ExperimentalSpreadProperty',\n\n // typescript-eslint, espree, acorn, etc.\n 'SpreadElement',\n ].includes(prop.type)) {\n continue;\n }\n\n const propVal = getSymbol(\n /** @type {import('eslint').Rule.Node} */ (\n /** @type {import('estree').Property} */\n (prop).value\n ),\n globals,\n scope,\n opts,\n );\n /* c8 ignore next 8 */\n if (propVal) {\n val.props[\n /** @type {import('estree').PrivateIdentifier} */\n (\n /** @type {import('estree').Property} */ (prop).key\n ).name\n ] = propVal;\n }\n }\n\n return val;\n }\n }\n /* c8 ignore next 2 */\n // eslint-disable-next-line @stylistic/padding-line-between-statements -- c8\n return null;\n};\n\n/**\n *\n * @param {CreatedNode} block\n * @param {string} name\n * @param {CreatedNode|null} value\n * @param {CreatedNode} globals\n * @param {boolean|SymbolOptions|undefined} isGlobal\n * @returns {void}\n */\nconst createBlockSymbol = function (block, name, value, globals, isGlobal) {\n block.props[name] = value;\n if (isGlobal && globals.props.window && globals.props.window.special) {\n globals.props.window.props[name] = value;\n }\n};\n\ncreateSymbol = function (node, globals, value, scope, isGlobal) {\n const block = scope || globals;\n /* c8 ignore next 3 */\n if (!node) {\n return null;\n }\n\n let symbol;\n switch (node.type) {\n case 'ClassDeclaration':\n /* c8 ignore next */\n // @ts-expect-error TS OK\n // Fall through\n case 'FunctionDeclaration': case 'TSEnumDeclaration':\n /* c8 ignore next */\n // @ts-expect-error TS OK\n // Fall through\n case 'TSInterfaceDeclaration': case 'TSTypeAliasDeclaration': {\n const nde = /** @type {import('estree').ClassDeclaration} */ (node);\n /* c8 ignore else */\n if (nde.id && nde.id.type === 'Identifier') {\n return createSymbol(\n /** @type {import('eslint').Rule.Node} */ (nde.id),\n globals,\n node,\n globals,\n );\n }\n /* c8 ignore next 3 */\n // eslint-disable-next-line @stylistic/padding-line-between-statements -- c8\n break;\n }\n\n case 'Identifier': {\n const nde = /** @type {import('estree').Identifier} */ (node);\n if (value) {\n const valueSymbol = getSymbol(value, globals, block);\n /* c8 ignore else */\n if (valueSymbol) {\n createBlockSymbol(block, nde.name, valueSymbol, globals, isGlobal);\n\n return block.props[nde.name];\n }\n /* c8 ignore next 2 */\n // eslint-disable-next-line @stylistic/padding-line-between-statements -- c8\n debug('Identifier: Missing value symbol for %s', nde.name);\n } else {\n createBlockSymbol(block, nde.name, createNode(), globals, isGlobal);\n\n return block.props[nde.name];\n }\n /* c8 ignore next 3 */\n // eslint-disable-next-line @stylistic/padding-line-between-statements -- c8\n break;\n }\n\n case 'MemberExpression': {\n const nde = /** @type {import('estree').MemberExpression} */ (node);\n symbol = getSymbol(\n /** @type {import('eslint').Rule.Node} */ (nde.object), globals, block,\n );\n\n const propertySymbol = getSymbol(\n /** @type {import('eslint').Rule.Node} */ (nde.property),\n globals,\n block,\n {\n simpleIdentifier: !nde.computed,\n },\n );\n const propertyValue = getSymbolValue(propertySymbol);\n if (symbol && propertyValue) {\n createBlockSymbol(symbol, propertyValue, getSymbol(\n /** @type {import('eslint').Rule.Node} */\n (value), globals, block,\n ), globals, isGlobal);\n return symbol.props[propertyValue];\n }\n\n debug(\n 'MemberExpression: Missing symbol: %s',\n /** @type {import('estree').Identifier} */ (\n nde.property\n ).name,\n );\n break;\n }\n }\n\n return null;\n};\n\n/**\n * Creates variables from variable definitions\n * @param {import('eslint').Rule.Node} node\n * @param {CreatedNode} globals\n * @param {import('./rules/requireJsdoc.js').RequireJsdocOpts} opts\n * @returns {void}\n */\nconst initVariables = function (node, globals, opts) {\n switch (node.type) {\n case 'ExportNamedDeclaration': {\n if (node.declaration) {\n initVariables(\n /** @type {import('eslint').Rule.Node} */\n (node.declaration),\n globals,\n opts,\n );\n }\n\n break;\n }\n\n case 'ExpressionStatement': {\n initVariables(\n /** @type {import('eslint').Rule.Node} */\n (node.expression),\n globals,\n opts,\n );\n break;\n }\n\n case 'Program': {\n for (const childNode of node.body) {\n initVariables(\n /** @type {import('eslint').Rule.Node} */\n (childNode),\n globals,\n opts,\n );\n }\n\n break;\n }\n\n case 'VariableDeclaration': {\n for (const declaration of node.declarations) {\n // let and const\n const symbol = createSymbol(\n /** @type {import('eslint').Rule.Node} */\n (declaration.id),\n globals,\n null,\n globals,\n );\n if (opts.initWindow && node.kind === 'var' && globals.props.window) {\n // If var, also add to window\n globals.props.window.props[\n /** @type {import('estree').Identifier} */\n (declaration.id).name\n ] = symbol;\n }\n }\n\n break;\n }\n }\n};\n\n/* eslint-disable complexity -- Temporary */\n\n/**\n * Populates variable maps using AST\n * @param {import('eslint').Rule.Node|import('@typescript-eslint/types').TSESTree.Node} node\n * @param {CreatedNode} globals\n * @param {import('./rules/requireJsdoc.js').RequireJsdocOpts} opt\n * @param {true} [isExport]\n * @returns {boolean}\n */\nconst mapVariables = function (node, globals, opt, isExport) {\n /* eslint-enable complexity -- Temporary */\n /* c8 ignore next */\n const opts = opt || {};\n /* c8 ignore next */\n switch (node.type) {\n case 'AssignmentExpression': {\n createSymbol(\n /** @type {import('eslint').Rule.Node} */\n (node.left),\n globals,\n /** @type {import('eslint').Rule.Node} */\n (node.right),\n );\n break;\n }\n\n case 'ClassDeclaration': {\n createSymbol(\n /** @type {import('eslint').Rule.Node|null} */ (node.id),\n globals,\n /** @type {import('eslint').Rule.Node} */ (node.body),\n globals,\n );\n break;\n }\n\n case 'ExportDefaultDeclaration': {\n const symbol = createSymbol(\n /** @type {import('eslint').Rule.Node} */\n (node.declaration),\n globals,\n /** @type {import('eslint').Rule.Node} */\n (node.declaration),\n );\n if (symbol) {\n symbol.exported = true;\n /* c8 ignore next 6 */\n } else {\n // if (!node.id) {\n globals.ANONYMOUS_DEFAULT = /** @type {import('eslint').Rule.Node} */ (\n node.declaration\n );\n }\n\n break;\n }\n\n case 'ExportNamedDeclaration': {\n if (node.declaration) {\n if (node.declaration.type === 'VariableDeclaration') {\n mapVariables(\n /** @type {import('eslint').Rule.Node} */\n (node.declaration),\n globals,\n opts,\n true,\n );\n } else {\n const symbol = createSymbol(\n /** @type {import('eslint').Rule.Node} */\n (node.declaration),\n globals,\n /** @type {import('eslint').Rule.Node} */\n (node.declaration),\n );\n /* c8 ignore next 3 */\n if (symbol) {\n symbol.exported = true;\n }\n }\n }\n\n for (const specifier of node.specifiers) {\n mapVariables(\n /** @type {import('eslint').Rule.Node} */\n (specifier),\n globals,\n opts,\n );\n }\n\n break;\n }\n\n case 'ExportSpecifier': {\n const symbol = getSymbol(\n /** @type {import('eslint').Rule.Node} */\n (node.local),\n globals,\n globals,\n );\n /* c8 ignore next 3 */\n if (symbol) {\n symbol.exported = true;\n }\n\n break;\n }\n\n case 'ExpressionStatement': {\n mapVariables(\n /** @type {import('eslint').Rule.Node} */\n (node.expression),\n globals,\n opts,\n );\n break;\n }\n\n case 'FunctionDeclaration':\n\n case 'TSTypeAliasDeclaration': {\n /* c8 ignore next 10 */\n if (/** @type {import('estree').Identifier} */ (node.id).type === 'Identifier') {\n createSymbol(\n /** @type {import('eslint').Rule.Node} */\n (node.id),\n globals,\n node,\n globals,\n true,\n );\n }\n\n break;\n }\n\n case 'Program': {\n if (opts.ancestorsOnly) {\n return false;\n }\n\n for (const childNode of node.body) {\n mapVariables(\n /** @type {import('eslint').Rule.Node} */\n (childNode),\n globals,\n opts,\n );\n }\n\n break;\n }\n\n case 'VariableDeclaration': {\n for (const declaration of node.declarations) {\n const isGlobal = Boolean(opts.initWindow && node.kind === 'var' && globals.props.window);\n const symbol = createSymbol(\n /** @type {import('eslint').Rule.Node} */\n (declaration.id),\n globals,\n /** @type {import('eslint').Rule.Node} */\n (declaration.init),\n globals,\n isGlobal,\n );\n if (symbol && isExport) {\n symbol.exported = true;\n }\n }\n\n break;\n }\n\n default: {\n /* c8 ignore next */\n return false;\n }\n }\n\n return true;\n};\n\n/**\n *\n * @param {import('eslint').Rule.Node} node\n * @param {CreatedNode|ValueObject|string|undefined|\n * import('eslint').Rule.Node|import('@typescript-eslint/types').TSESTree.Node} block\n * @param {(CreatedNode|ValueObject|string|\n * import('eslint').Rule.Node|import('@typescript-eslint/types').TSESTree.Node)[]} [cache]\n * @returns {boolean}\n */\nconst findNode = function (node, block, cache) {\n let blockCache = cache || [];\n if (!block || blockCache.includes(block)) {\n return false;\n }\n\n blockCache = blockCache.slice();\n blockCache.push(block);\n\n if (\n typeof block === 'object' &&\n 'type' in block &&\n (block.type === 'object' || block.type === 'MethodDefinition') &&\n block.value === node\n ) {\n return true;\n }\n\n if (typeof block !== 'object') {\n return false;\n }\n\n const props = ('props' in block && block.props) || ('body' in block && block.body);\n for (const propval of Object.values(props || {})) {\n if (Array.isArray(propval)) {\n /* c8 ignore next 5 */\n if (propval.some((val) => {\n return findNode(node, val, blockCache);\n })) {\n return true;\n }\n } else if (findNode(node, propval, blockCache)) {\n return true;\n }\n }\n\n return false;\n};\n\nconst exportTypes = new Set([\n 'ExportDefaultDeclaration', 'ExportNamedDeclaration',\n]);\nconst ignorableNestedTypes = new Set([\n 'ArrowFunctionExpression', 'FunctionDeclaration', 'FunctionExpression',\n]);\n\n/**\n * @param {import('eslint').Rule.Node} nde\n * @returns {import('eslint').Rule.Node|false}\n */\nconst getExportAncestor = function (nde) {\n let node = nde;\n let idx = 0;\n const ignorableIfDeep = ignorableNestedTypes.has(nde?.type);\n while (node) {\n // Ignore functions nested more deeply than say `export default function () {}`\n if (idx >= 2 && ignorableIfDeep) {\n break;\n }\n\n if (exportTypes.has(node.type)) {\n return node;\n }\n\n node = node.parent;\n idx++;\n }\n\n return false;\n};\n\nconst canBeExportedByAncestorType = new Set([\n 'ClassProperty',\n 'Method',\n 'PropertyDefinition',\n 'TSMethodSignature',\n 'TSPropertySignature',\n]);\n\nconst canExportChildrenType = new Set([\n 'ClassBody',\n 'ClassDeclaration',\n 'ClassDefinition',\n 'ClassExpression',\n 'Program',\n 'TSInterfaceBody',\n 'TSInterfaceDeclaration',\n 'TSTypeAliasDeclaration',\n 'TSTypeLiteral',\n 'TSTypeParameterInstantiation',\n 'TSTypeReference',\n]);\n\n/**\n * @param {import('eslint').Rule.Node} nde\n * @returns {false|import('eslint').Rule.Node}\n */\nconst isExportByAncestor = function (nde) {\n if (!canBeExportedByAncestorType.has(nde.type)) {\n return false;\n }\n\n let node = nde.parent;\n while (node) {\n if (exportTypes.has(node.type)) {\n return node;\n }\n\n if (!canExportChildrenType.has(node.type)) {\n return false;\n }\n\n node = node.parent;\n }\n\n return false;\n};\n\n/**\n *\n * @param {CreatedNode} block\n * @param {import('eslint').Rule.Node} node\n * @param {CreatedNode[]} [cache] Currently unused\n * @returns {boolean}\n */\nconst findExportedNode = function (block, node, cache) {\n /* c8 ignore next 3 */\n if (block === null) {\n return false;\n }\n\n const blockCache = cache || [];\n const {\n props,\n } = block;\n for (const propval of Object.values(props)) {\n const pval = /** @type {CreatedNode} */ (propval);\n blockCache.push(pval);\n if (pval.exported && (node === pval.value || findNode(node, pval.value))) {\n return true;\n }\n\n // No need to check `propval` for exported nodes as ESM\n // exports are only global\n }\n\n return false;\n};\n\n/**\n *\n * @param {import('eslint').Rule.Node} node\n * @param {CreatedNode} globals\n * @param {import('./rules/requireJsdoc.js').RequireJsdocOpts} opt\n * @returns {boolean}\n */\nconst isNodeExported = function (node, globals, opt) {\n const moduleExports = globals.props.module?.props?.exports;\n if (\n opt.initModuleExports && moduleExports && findNode(node, moduleExports)\n ) {\n return true;\n }\n\n if (opt.initWindow && globals.props.window && findNode(node, globals.props.window)) {\n return true;\n }\n\n if (opt.esm && findExportedNode(globals, node)) {\n return true;\n }\n\n return false;\n};\n\n/**\n *\n * @param {import('eslint').Rule.Node} node\n * @param {CreatedNode} globalVars\n * @param {import('./rules/requireJsdoc.js').RequireJsdocOpts} opts\n * @returns {boolean}\n */\nconst parseRecursive = function (node, globalVars, opts) {\n // Iterate from top using recursion - stop at first processed node from top\n if (node.parent && parseRecursive(node.parent, globalVars, opts)) {\n return true;\n }\n\n return mapVariables(node, globalVars, opts);\n};\n\n/**\n *\n * @param {import('eslint').Rule.Node} ast\n * @param {import('eslint').Rule.Node} node\n * @param {import('./rules/requireJsdoc.js').RequireJsdocOpts} opt\n * @returns {CreatedNode}\n */\nconst parse = function (ast, node, opt) {\n /* c8 ignore next 6 */\n const opts = opt || {\n ancestorsOnly: false,\n esm: true,\n initModuleExports: true,\n initWindow: true,\n };\n\n const globalVars = createNode();\n if (opts.initModuleExports) {\n globalVars.props.module = createNode();\n globalVars.props.module.props.exports = createNode();\n globalVars.props.exports = globalVars.props.module.props.exports;\n }\n\n if (opts.initWindow) {\n globalVars.props.window = createNode();\n globalVars.props.window.special = true;\n }\n\n if (opts.ancestorsOnly) {\n parseRecursive(node, globalVars, opts);\n } else {\n initVariables(ast, globalVars, opts);\n mapVariables(ast, globalVars, opts);\n }\n\n return {\n globalVars,\n props: {},\n };\n};\n\nconst accessibilityNodes = new Set([\n 'MethodDefinition',\n 'PropertyDefinition',\n]);\n\n/**\n *\n * @param {import('eslint').Rule.Node} node\n * @returns {boolean}\n */\nconst isPrivate = (node) => {\n return accessibilityNodes.has(node.type) &&\n (\n 'accessibility' in node &&\n node.accessibility !== 'public' && node.accessibility !== undefined\n ) ||\n 'key' in node &&\n node.key.type === 'PrivateIdentifier';\n};\n\n/**\n *\n * @param {import('eslint').Rule.Node} node\n * @param {import('eslint').SourceCode} sourceCode\n * @param {import('./rules/requireJsdoc.js').RequireJsdocOpts} opt\n * @param {import('./iterateJsdoc.js').Settings} settings\n * @returns {boolean}\n */\nconst isUncommentedExport = function (node, sourceCode, opt, settings) {\n // console.log({node});\n // Optimize with ancestor check for esm\n if (opt.esm) {\n if (isPrivate(node) ||\n node.parent && isPrivate(node.parent)) {\n return false;\n }\n\n const exportNode = getExportAncestor(node);\n\n // Is export node comment\n if (exportNode && !findJSDocComment(exportNode, sourceCode, settings)) {\n return true;\n }\n\n /**\n * Some typescript types are not in variable map, but inherit exported (interface property and method)\n */\n if (\n isExportByAncestor(node) &&\n !findJSDocComment(node, sourceCode, settings)\n ) {\n return true;\n }\n }\n\n const ast = /** @type {unknown} */ (sourceCode.ast);\n\n const parseResult = parse(\n /** @type {import('eslint').Rule.Node} */\n (ast),\n node,\n opt,\n );\n\n return isNodeExported(\n node, /** @type {CreatedNode} */ (parseResult.globalVars), opt,\n );\n};\n\nexport default {\n isUncommentedExport,\n parse,\n};\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AAGA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAgC,SAAAE,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEhC,MAAMG,KAAK,GAAG,IAAAC,cAAW,EAAC,oBAAoB,CAAC;;AAE/C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAMC,UAAU,GAAG,SAAAA,CAAA,EAAY;EAC7B,OAAO;IACLC,KAAK,EAAE,CAAC;EACV,CAAC;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA,MAAMC,cAAc,GAAG,SAAAA,CAAUC,MAAM,EAAE;EACvC;EACA,IAAI,CAACA,MAAM,EAAE;IACX,OAAO,IAAI;EACb;;EAEA;EACA,IAAIA,MAAM,CAACC,IAAI,KAAK,SAAS,EAAE;IAC7B,OAAO,0BAA4BD,MAAM,CAACE,KAAK,CAAEA,KAAK;EACxD;EACA;EACA;EACA,OAAO,IAAI;AACb,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,aAAa,GAAG,SAAAA,CAAUC,IAAI,EAAEC,OAAO,EAAEC,KAAK,EAAEC,IAAI,EAAE;EAC1D,IAAIA,IAAI,CAACC,gBAAgB,EAAE;IACzB;IACA,MAAMC,iBAAiB,GAAGZ,UAAU,CAAC,CAAC;IACtCY,iBAAiB,CAACR,IAAI,GAAG,SAAS;IAClCQ,iBAAiB,CAACP,KAAK,GAAG;MACxBA,KAAK,EAAEE,IAAI,CAACM;IACd,CAAC;IAED,OAAOD,iBAA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CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM6F,mBAAmB,GAAG,SAAAA,CAAU1F,IAAI,EAAE2F,UAAU,EAAEjF,GAAG,EAAEkF,QAAQ,EAAE;EACrE;EACA;EACA,IAAIlF,GAAG,CAACuE,GAAG,EAAE;IACX,IAAIM,SAAS,CAACvF,IAAI,CAAC,IACjBA,IAAI,CAACkB,MAAM,IAAIqE,SAAS,CAACvF,IAAI,CAACkB,MAAM,CAAC,EAAE;MACvC,OAAO,KAAK;IACd;IAEA,MAAM2E,UAAU,GAAG1B,iBAAiB,CAACnE,IAAI,CAAC;;IAE1C;IACA,IAAI6F,UAAU,IAAI,CAAC,IAAAC,8BAAgB,EAACD,UAAU,EAAEF,UAAU,EAAEC,QAAQ,CAAC,EAAE;MACrE,OAAO,IAAI;IACb;;IAEA;AACJ;AACA;IACI,IACEnB,kBAAkB,CAACzE,IAAI,CAAC,IACxB,CAAC,IAAA8F,8BAAgB,EAAC9F,IAAI,EAAE2F,UAAU,EAAEC,QAAQ,CAAC,EAC7C;MACA,OAAO,IAAI;IACb;EACF;EAEA,MAAMP,GAAG,GAAG,sBAAwBM,UAAU,CAACN,GAAI;EAEnD,MAAMU,WAAW,GAAGX,KAAK,CACvB;EACCC,GAAG,EACJrF,IAAI,EACJU,GACF,CAAC;EAED,OAAOkE,cAAc,CACnB5E,IAAI,EAAE,0BAA4B+F,WAAW,CAACZ,UAAU,EAAGzE,GAC7D,CAAC;AACH,CAAC;AAAC,IAAAsF,QAAA,GAAAjB,OAAA,CAAAzF,OAAA,GAEa;EACboG,mBAAmB;EACnBN;AACF,CAAC;AAAAN,MAAA,CAAAC,OAAA,GAAAA,OAAA,CAAAzF,OAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"exportParser.cjs","names":["_jsdoccomment","require","_debug","_interopRequireDefault","e","__esModule","default","debug","debugModule","createNode","props","getSymbolValue","symbol","type","value","getIdentifier","node","globals","scope","opts","simpleIdentifier","identifierLiteral","name","block","createSymbol","getSymbol","opt","val","prototype","left","right","method","body","key","parent","obj","object","propertySymbol","property","computed","propertyValue","prop","properties","includes","propVal","createBlockSymbol","isGlobal","window","special","nde","id","valueSymbol","initVariables","declaration","expression","childNode","declarations","initWindow","kind","mapVariables","isExport","exported","ANONYMOUS_DEFAULT","specifier","specifiers","local","ancestorsOnly","Boolean","init","findNode","cache","blockCache","slice","push","propval","Object","values","Array","isArray","some","exportTypes","Set","ignorableNestedTypes","getExportAncestor","idx","ignorableIfDeep","has","canBeExportedByAncestorType","canExportChildrenType","isExportByAncestor","findExportedNode","pval","isNodeExported","moduleExports","module","exports","initModuleExports","esm","parseRecursive","globalVars","parse","ast","accessibilityNodes","isPrivate","accessibility","undefined","isUncommentedExport","sourceCode","settings","exportNode","findJSDocComment","parseResult","_default"],"sources":["../src/exportParser.js"],"sourcesContent":["import {\n findJSDocComment,\n} from '@es-joy/jsdoccomment';\nimport debugModule from 'debug';\n\nconst debug = debugModule('requireExportJsdoc');\n\n/**\n * @typedef {{\n * value: string\n * }} ValueObject\n */\n\n/**\n * @typedef {{\n * type?: string,\n * value?: ValueObject|import('eslint').Rule.Node|import('@typescript-eslint/types').TSESTree.Node,\n * props: {\n * [key: string]: CreatedNode|null,\n * },\n * special?: true,\n * globalVars?: CreatedNode,\n * exported?: boolean,\n * ANONYMOUS_DEFAULT?: import('eslint').Rule.Node\n * }} CreatedNode\n */\n\n/**\n * @returns {CreatedNode}\n */\nconst createNode = function () {\n return {\n props: {},\n };\n};\n\n/**\n * @param {CreatedNode|null} symbol\n * @returns {string|null}\n */\nconst getSymbolValue = function (symbol) {\n /* c8 ignore next 3 */\n if (!symbol) {\n return null;\n }\n\n /* c8 ignore else */\n if (symbol.type === 'literal') {\n return /** @type {ValueObject} */ (symbol.value).value;\n }\n /* c8 ignore next 2 */\n // eslint-disable-next-line @stylistic/padding-line-between-statements -- c8\n return null;\n};\n\n/**\n *\n * @param {import('estree').Identifier} node\n * @param {CreatedNode} globals\n * @param {CreatedNode} scope\n * @param {SymbolOptions} opts\n * @returns {CreatedNode|null}\n */\nconst getIdentifier = function (node, globals, scope, opts) {\n if (opts.simpleIdentifier) {\n // Type is Identier for noncomputed properties\n const identifierLiteral = createNode();\n identifierLiteral.type = 'literal';\n identifierLiteral.value = {\n value: node.name,\n };\n\n return identifierLiteral;\n }\n\n /* c8 ignore next */\n const block = scope || globals;\n\n // As scopes are not currently supported, they are not traversed upwards recursively\n if (block.props[node.name]) {\n return block.props[node.name];\n }\n\n // Seems this will only be entered once scopes added and entered\n /* c8 ignore next 3 */\n if (globals.props[node.name]) {\n return globals.props[node.name];\n }\n\n return null;\n};\n\n/**\n * @callback CreateSymbol\n * @param {import('eslint').Rule.Node|null} node\n * @param {CreatedNode} globals\n * @param {import('eslint').Rule.Node|import('@typescript-eslint/types').TSESTree.Node|null} value\n * @param {CreatedNode} [scope]\n * @param {boolean|SymbolOptions} [isGlobal]\n * @returns {CreatedNode|null}\n */\n\n/** @type {CreateSymbol} */\nlet createSymbol; // eslint-disable-line prefer-const\n\n/**\n * @typedef {{\n * simpleIdentifier?: boolean\n * }} SymbolOptions\n */\n\n/**\n *\n * @param {import('eslint').Rule.Node|import('@typescript-eslint/types').TSESTree.Node} node\n * @param {CreatedNode} globals\n * @param {CreatedNode} scope\n * @param {SymbolOptions} [opt]\n * @returns {CreatedNode|null}\n */\nconst getSymbol = function (node, globals, scope, opt) {\n const opts = opt || {};\n /* c8 ignore next */\n switch (node.type) {\n /* c8 ignore next 4 -- No longer needed? */\n case 'ArrowFunctionExpression':\n\n // Fallthrough\n case 'ClassDeclaration':\n\n case 'FunctionDeclaration':\n\n case 'FunctionExpression':\n case 'TSEnumDeclaration':\n case 'TSInterfaceDeclaration':\n case 'TSTypeAliasDeclaration': {\n const val = createNode();\n val.props.prototype = createNode();\n val.props.prototype.type = 'object';\n val.type = 'object';\n val.value = node;\n\n return val;\n }\n\n case 'AssignmentExpression': {\n return createSymbol(\n /** @type {import('eslint').Rule.Node} */\n (node.left),\n globals,\n /** @type {import('eslint').Rule.Node} */\n (node.right),\n scope,\n opts,\n );\n }\n\n case 'ClassBody': {\n const val = createNode();\n for (const method of node.body) {\n // StaticBlock\n if (!('key' in method)) {\n continue;\n }\n\n val.props[\n /** @type {import('estree').Identifier} */ (\n /** @type {import('estree').MethodDefinition} */ (\n method\n ).key\n ).name\n ] = createNode();\n /** @type {{[key: string]: CreatedNode}} */ (val.props)[\n /** @type {import('estree').Identifier} */ (\n /** @type {import('estree').MethodDefinition} */ (\n method\n ).key\n ).name\n ].type = 'object';\n /** @type {{[key: string]: CreatedNode}} */ (val.props)[\n /** @type {import('estree').Identifier} */ (\n /** @type {import('estree').MethodDefinition} */ (\n method\n ).key\n ).name\n ].value = /** @type {import('eslint').Rule.Node} */ (\n /** @type {import('estree').MethodDefinition} */ (method).value\n );\n }\n\n val.type = 'object';\n val.value = node.parent;\n\n return val;\n }\n\n case 'ClassExpression': {\n return getSymbol(\n /** @type {import('eslint').Rule.Node} */\n (node.body),\n globals,\n scope,\n opts,\n );\n }\n\n case 'Identifier': {\n return getIdentifier(node, globals, scope, opts);\n }\n\n case 'Literal': {\n const val = createNode();\n val.type = 'literal';\n val.value = node;\n\n return val;\n }\n\n case 'MemberExpression': {\n const obj = getSymbol(\n /** @type {import('eslint').Rule.Node} */\n (node.object),\n globals,\n scope,\n opts,\n );\n const propertySymbol = getSymbol(\n /** @type {import('eslint').Rule.Node} */\n (node.property),\n globals,\n scope,\n {\n simpleIdentifier: !node.computed,\n },\n );\n const propertyValue = getSymbolValue(propertySymbol);\n\n /* c8 ignore else */\n if (obj && propertyValue && obj.props[propertyValue]) {\n const block = obj.props[propertyValue];\n\n return block;\n }\n /* c8 ignore next 11 */\n /*\n if (opts.createMissingProps && propertyValue) {\n obj.props[propertyValue] = createNode();\n\n return obj.props[propertyValue];\n }\n */\n // eslint-disable-next-line @stylistic/padding-line-between-statements -- c8\n debug(`MemberExpression: Missing property ${\n /** @type {import('estree').PrivateIdentifier} */ (node.property).name\n }`);\n /* c8 ignore next 2 */\n return null;\n }\n\n case 'ObjectExpression': {\n const val = createNode();\n val.type = 'object';\n for (const prop of node.properties) {\n if ([\n // @babel/eslint-parser\n 'ExperimentalSpreadProperty',\n\n // typescript-eslint, espree, acorn, etc.\n 'SpreadElement',\n ].includes(prop.type)) {\n continue;\n }\n\n const propVal = getSymbol(\n /** @type {import('eslint').Rule.Node} */ (\n /** @type {import('estree').Property} */\n (prop).value\n ),\n globals,\n scope,\n opts,\n );\n /* c8 ignore next 8 */\n if (propVal) {\n val.props[\n /** @type {import('estree').PrivateIdentifier} */\n (\n /** @type {import('estree').Property} */ (prop).key\n ).name\n ] = propVal;\n }\n }\n\n return val;\n }\n }\n /* c8 ignore next 2 */\n // eslint-disable-next-line @stylistic/padding-line-between-statements -- c8\n return null;\n};\n\n/**\n *\n * @param {CreatedNode} block\n * @param {string} name\n * @param {CreatedNode|null} value\n * @param {CreatedNode} globals\n * @param {boolean|SymbolOptions|undefined} isGlobal\n * @returns {void}\n */\nconst createBlockSymbol = function (block, name, value, globals, isGlobal) {\n block.props[name] = value;\n if (isGlobal && globals.props.window && globals.props.window.special) {\n globals.props.window.props[name] = value;\n }\n};\n\ncreateSymbol = function (node, globals, value, scope, isGlobal) {\n const block = scope || globals;\n /* c8 ignore next 3 */\n if (!node) {\n return null;\n }\n\n let symbol;\n switch (node.type) {\n case 'ClassDeclaration':\n /* c8 ignore next */\n // @ts-expect-error TS OK\n // Fall through\n case 'FunctionDeclaration': case 'TSEnumDeclaration':\n /* c8 ignore next */\n // @ts-expect-error TS OK\n // Fall through\n case 'TSInterfaceDeclaration': case 'TSTypeAliasDeclaration': {\n const nde = /** @type {import('estree').ClassDeclaration} */ (node);\n /* c8 ignore else */\n if (nde.id && nde.id.type === 'Identifier') {\n return createSymbol(\n /** @type {import('eslint').Rule.Node} */ (nde.id),\n globals,\n node,\n globals,\n );\n }\n /* c8 ignore next 3 */\n // eslint-disable-next-line @stylistic/padding-line-between-statements -- c8\n break;\n }\n\n case 'Identifier': {\n const nde = /** @type {import('estree').Identifier} */ (node);\n if (value) {\n const valueSymbol = getSymbol(value, globals, block);\n /* c8 ignore else */\n if (valueSymbol) {\n createBlockSymbol(block, nde.name, valueSymbol, globals, isGlobal);\n\n return block.props[nde.name];\n }\n /* c8 ignore next 2 */\n // eslint-disable-next-line @stylistic/padding-line-between-statements -- c8\n debug('Identifier: Missing value symbol for %s', nde.name);\n } else {\n createBlockSymbol(block, nde.name, createNode(), globals, isGlobal);\n\n return block.props[nde.name];\n }\n /* c8 ignore next 3 */\n // eslint-disable-next-line @stylistic/padding-line-between-statements -- c8\n break;\n }\n\n case 'MemberExpression': {\n const nde = /** @type {import('estree').MemberExpression} */ (node);\n symbol = getSymbol(\n /** @type {import('eslint').Rule.Node} */ (nde.object), globals, block,\n );\n\n const propertySymbol = getSymbol(\n /** @type {import('eslint').Rule.Node} */ (nde.property),\n globals,\n block,\n {\n simpleIdentifier: !nde.computed,\n },\n );\n const propertyValue = getSymbolValue(propertySymbol);\n if (symbol && propertyValue) {\n createBlockSymbol(symbol, propertyValue, getSymbol(\n /** @type {import('eslint').Rule.Node} */\n (value), globals, block,\n ), globals, isGlobal);\n return symbol.props[propertyValue];\n }\n\n debug(\n 'MemberExpression: Missing symbol: %s',\n /** @type {import('estree').Identifier} */ (\n nde.property\n ).name,\n );\n break;\n }\n }\n\n return null;\n};\n\n/**\n * Creates variables from variable definitions\n * @param {import('eslint').Rule.Node} node\n * @param {CreatedNode} globals\n * @param {import('./rules/requireJsdoc.js').RequireJsdocOpts} opts\n * @returns {void}\n */\nconst initVariables = function (node, globals, opts) {\n switch (node.type) {\n case 'ExportNamedDeclaration': {\n if (node.declaration) {\n initVariables(\n /** @type {import('eslint').Rule.Node} */\n (node.declaration),\n globals,\n opts,\n );\n }\n\n break;\n }\n\n case 'ExpressionStatement': {\n initVariables(\n /** @type {import('eslint').Rule.Node} */\n (node.expression),\n globals,\n opts,\n );\n break;\n }\n\n case 'Program': {\n for (const childNode of node.body) {\n initVariables(\n /** @type {import('eslint').Rule.Node} */\n (childNode),\n globals,\n opts,\n );\n }\n\n break;\n }\n\n case 'VariableDeclaration': {\n for (const declaration of node.declarations) {\n // let and const\n const symbol = createSymbol(\n /** @type {import('eslint').Rule.Node} */\n (declaration.id),\n globals,\n null,\n globals,\n );\n if (opts.initWindow && node.kind === 'var' && globals.props.window) {\n // If var, also add to window\n globals.props.window.props[\n /** @type {import('estree').Identifier} */\n (declaration.id).name\n ] = symbol;\n }\n }\n\n break;\n }\n }\n};\n\n/**\n * Populates variable maps using AST\n * @param {import('eslint').Rule.Node|import('@typescript-eslint/types').TSESTree.Node} node\n * @param {CreatedNode} globals\n * @param {import('./rules/requireJsdoc.js').RequireJsdocOpts} opt\n * @param {true} [isExport]\n * @returns {boolean}\n */\nconst mapVariables = function (node, globals, opt, isExport) {\n /* c8 ignore next */\n const opts = opt || {};\n /* c8 ignore next */\n switch (node.type) {\n case 'AssignmentExpression': {\n createSymbol(\n /** @type {import('eslint').Rule.Node} */\n (node.left),\n globals,\n /** @type {import('eslint').Rule.Node} */\n (node.right),\n );\n break;\n }\n\n case 'ClassDeclaration': {\n createSymbol(\n /** @type {import('eslint').Rule.Node|null} */ (node.id),\n globals,\n /** @type {import('eslint').Rule.Node} */ (node.body),\n globals,\n );\n break;\n }\n\n case 'ExportDefaultDeclaration': {\n const symbol = createSymbol(\n /** @type {import('eslint').Rule.Node} */\n (node.declaration),\n globals,\n /** @type {import('eslint').Rule.Node} */\n (node.declaration),\n );\n if (symbol) {\n symbol.exported = true;\n /* c8 ignore next 6 */\n } else {\n // if (!node.id) {\n globals.ANONYMOUS_DEFAULT = /** @type {import('eslint').Rule.Node} */ (\n node.declaration\n );\n }\n\n break;\n }\n\n case 'ExportNamedDeclaration': {\n if (node.declaration) {\n if (node.declaration.type === 'VariableDeclaration') {\n mapVariables(\n /** @type {import('eslint').Rule.Node} */\n (node.declaration),\n globals,\n opts,\n true,\n );\n } else {\n const symbol = createSymbol(\n /** @type {import('eslint').Rule.Node} */\n (node.declaration),\n globals,\n /** @type {import('eslint').Rule.Node} */\n (node.declaration),\n );\n /* c8 ignore next 3 */\n if (symbol) {\n symbol.exported = true;\n }\n }\n }\n\n for (const specifier of node.specifiers) {\n mapVariables(\n /** @type {import('eslint').Rule.Node} */\n (specifier),\n globals,\n opts,\n );\n }\n\n break;\n }\n\n case 'ExportSpecifier': {\n const symbol = getSymbol(\n /** @type {import('eslint').Rule.Node} */\n (node.local),\n globals,\n globals,\n );\n /* c8 ignore next 3 */\n if (symbol) {\n symbol.exported = true;\n }\n\n break;\n }\n\n case 'ExpressionStatement': {\n mapVariables(\n /** @type {import('eslint').Rule.Node} */\n (node.expression),\n globals,\n opts,\n );\n break;\n }\n\n case 'FunctionDeclaration':\n\n case 'TSTypeAliasDeclaration': {\n /* c8 ignore next 10 */\n if (/** @type {import('estree').Identifier} */ (node.id).type === 'Identifier') {\n createSymbol(\n /** @type {import('eslint').Rule.Node} */\n (node.id),\n globals,\n node,\n globals,\n true,\n );\n }\n\n break;\n }\n\n case 'Program': {\n if (opts.ancestorsOnly) {\n return false;\n }\n\n for (const childNode of node.body) {\n mapVariables(\n /** @type {import('eslint').Rule.Node} */\n (childNode),\n globals,\n opts,\n );\n }\n\n break;\n }\n\n case 'VariableDeclaration': {\n for (const declaration of node.declarations) {\n const isGlobal = Boolean(opts.initWindow && node.kind === 'var' && globals.props.window);\n const symbol = createSymbol(\n /** @type {import('eslint').Rule.Node} */\n (declaration.id),\n globals,\n /** @type {import('eslint').Rule.Node} */\n (declaration.init),\n globals,\n isGlobal,\n );\n if (symbol && isExport) {\n symbol.exported = true;\n }\n }\n\n break;\n }\n\n default: {\n /* c8 ignore next */\n return false;\n }\n }\n\n return true;\n};\n\n/**\n *\n * @param {import('eslint').Rule.Node} node\n * @param {CreatedNode|ValueObject|string|undefined|\n * import('eslint').Rule.Node|import('@typescript-eslint/types').TSESTree.Node} block\n * @param {(CreatedNode|ValueObject|string|\n * import('eslint').Rule.Node|import('@typescript-eslint/types').TSESTree.Node)[]} [cache]\n * @returns {boolean}\n */\nconst findNode = function (node, block, cache) {\n let blockCache = cache || [];\n if (!block || blockCache.includes(block)) {\n return false;\n }\n\n blockCache = blockCache.slice();\n blockCache.push(block);\n\n if (\n typeof block === 'object' &&\n 'type' in block &&\n (block.type === 'object' || block.type === 'MethodDefinition') &&\n block.value === node\n ) {\n return true;\n }\n\n if (typeof block !== 'object') {\n return false;\n }\n\n const props = ('props' in block && block.props) || ('body' in block && block.body);\n for (const propval of Object.values(props || {})) {\n if (Array.isArray(propval)) {\n /* c8 ignore next 5 */\n if (propval.some((val) => {\n return findNode(node, val, blockCache);\n })) {\n return true;\n }\n } else if (findNode(node, propval, blockCache)) {\n return true;\n }\n }\n\n return false;\n};\n\nconst exportTypes = new Set([\n 'ExportDefaultDeclaration', 'ExportNamedDeclaration',\n]);\nconst ignorableNestedTypes = new Set([\n 'ArrowFunctionExpression', 'FunctionDeclaration', 'FunctionExpression',\n]);\n\n/**\n * @param {import('eslint').Rule.Node} nde\n * @returns {import('eslint').Rule.Node|false}\n */\nconst getExportAncestor = function (nde) {\n let node = nde;\n let idx = 0;\n const ignorableIfDeep = ignorableNestedTypes.has(nde?.type);\n while (node) {\n // Ignore functions nested more deeply than say `export default function () {}`\n if (idx >= 2 && ignorableIfDeep) {\n break;\n }\n\n if (exportTypes.has(node.type)) {\n return node;\n }\n\n node = node.parent;\n idx++;\n }\n\n return false;\n};\n\nconst canBeExportedByAncestorType = new Set([\n 'ClassProperty',\n 'Method',\n 'PropertyDefinition',\n 'TSMethodSignature',\n 'TSPropertySignature',\n]);\n\nconst canExportChildrenType = new Set([\n 'ClassBody',\n 'ClassDeclaration',\n 'ClassDefinition',\n 'ClassExpression',\n 'Program',\n 'TSInterfaceBody',\n 'TSInterfaceDeclaration',\n 'TSTypeAliasDeclaration',\n 'TSTypeLiteral',\n 'TSTypeParameterInstantiation',\n 'TSTypeReference',\n]);\n\n/**\n * @param {import('eslint').Rule.Node} nde\n * @returns {false|import('eslint').Rule.Node}\n */\nconst isExportByAncestor = function (nde) {\n if (!canBeExportedByAncestorType.has(nde.type)) {\n return false;\n }\n\n let node = nde.parent;\n while (node) {\n if (exportTypes.has(node.type)) {\n return node;\n }\n\n if (!canExportChildrenType.has(node.type)) {\n return false;\n }\n\n node = node.parent;\n }\n\n return false;\n};\n\n/**\n *\n * @param {CreatedNode} block\n * @param {import('eslint').Rule.Node} node\n * @param {CreatedNode[]} [cache] Currently unused\n * @returns {boolean}\n */\nconst findExportedNode = function (block, node, cache) {\n /* c8 ignore next 3 */\n if (block === null) {\n return false;\n }\n\n const blockCache = cache || [];\n const {\n props,\n } = block;\n for (const propval of Object.values(props)) {\n const pval = /** @type {CreatedNode} */ (propval);\n blockCache.push(pval);\n if (pval.exported && (node === pval.value || findNode(node, pval.value))) {\n return true;\n }\n\n // No need to check `propval` for exported nodes as ESM\n // exports are only global\n }\n\n return false;\n};\n\n/**\n *\n * @param {import('eslint').Rule.Node} node\n * @param {CreatedNode} globals\n * @param {import('./rules/requireJsdoc.js').RequireJsdocOpts} opt\n * @returns {boolean}\n */\nconst isNodeExported = function (node, globals, opt) {\n const moduleExports = globals.props.module?.props?.exports;\n if (\n opt.initModuleExports && moduleExports && findNode(node, moduleExports)\n ) {\n return true;\n }\n\n if (opt.initWindow && globals.props.window && findNode(node, globals.props.window)) {\n return true;\n }\n\n if (opt.esm && findExportedNode(globals, node)) {\n return true;\n }\n\n return false;\n};\n\n/**\n *\n * @param {import('eslint').Rule.Node} node\n * @param {CreatedNode} globalVars\n * @param {import('./rules/requireJsdoc.js').RequireJsdocOpts} opts\n * @returns {boolean}\n */\nconst parseRecursive = function (node, globalVars, opts) {\n // Iterate from top using recursion - stop at first processed node from top\n if (node.parent && parseRecursive(node.parent, globalVars, opts)) {\n return true;\n }\n\n return mapVariables(node, globalVars, opts);\n};\n\n/**\n *\n * @param {import('eslint').Rule.Node} ast\n * @param {import('eslint').Rule.Node} node\n * @param {import('./rules/requireJsdoc.js').RequireJsdocOpts} opt\n * @returns {CreatedNode}\n */\nconst parse = function (ast, node, opt) {\n /* c8 ignore next 6 */\n const opts = opt || {\n ancestorsOnly: false,\n esm: true,\n initModuleExports: true,\n initWindow: true,\n };\n\n const globalVars = createNode();\n if (opts.initModuleExports) {\n globalVars.props.module = createNode();\n globalVars.props.module.props.exports = createNode();\n globalVars.props.exports = globalVars.props.module.props.exports;\n }\n\n if (opts.initWindow) {\n globalVars.props.window = createNode();\n globalVars.props.window.special = true;\n }\n\n if (opts.ancestorsOnly) {\n parseRecursive(node, globalVars, opts);\n } else {\n initVariables(ast, globalVars, opts);\n mapVariables(ast, globalVars, opts);\n }\n\n return {\n globalVars,\n props: {},\n };\n};\n\nconst accessibilityNodes = new Set([\n 'MethodDefinition',\n 'PropertyDefinition',\n]);\n\n/**\n *\n * @param {import('eslint').Rule.Node} node\n * @returns {boolean}\n */\nconst isPrivate = (node) => {\n return accessibilityNodes.has(node.type) &&\n (\n 'accessibility' in node &&\n node.accessibility !== 'public' && node.accessibility !== undefined\n ) ||\n 'key' in node &&\n node.key.type === 'PrivateIdentifier';\n};\n\n/**\n *\n * @param {import('eslint').Rule.Node} node\n * @param {import('eslint').SourceCode} sourceCode\n * @param {import('./rules/requireJsdoc.js').RequireJsdocOpts} opt\n * @param {import('./iterateJsdoc.js').Settings} settings\n * @returns {boolean}\n */\nconst isUncommentedExport = function (node, sourceCode, opt, settings) {\n // console.log({node});\n // Optimize with ancestor check for esm\n if (opt.esm) {\n if (isPrivate(node) ||\n node.parent && isPrivate(node.parent)) {\n return false;\n }\n\n const exportNode = getExportAncestor(node);\n\n // Is export node comment\n if (exportNode && !findJSDocComment(exportNode, sourceCode, settings)) {\n return true;\n }\n\n /**\n * Some typescript types are not in variable map, but inherit exported (interface property and method)\n */\n if (\n isExportByAncestor(node) &&\n !findJSDocComment(node, sourceCode, settings)\n ) {\n return true;\n }\n }\n\n const ast = /** @type {unknown} */ (sourceCode.ast);\n\n const parseResult = parse(\n /** @type {import('eslint').Rule.Node} */\n (ast),\n node,\n opt,\n );\n\n return isNodeExported(\n node, /** @type {CreatedNode} */ (parseResult.globalVars), opt,\n );\n};\n\nexport default {\n isUncommentedExport,\n parse,\n};\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AAGA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAgC,SAAAE,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEhC,MAAMG,KAAK,GAAG,IAAAC,cAAW,EAAC,oBAAoB,CAAC;;AAE/C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAMC,UAAU,GAAG,SAAAA,CAAA,EAAY;EAC7B,OAAO;IACLC,KAAK,EAAE,CAAC;EACV,CAAC;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA,MAAMC,cAAc,GAAG,SAAAA,CAAUC,MAAM,EAAE;EACvC;EACA,IAAI,CAACA,MAAM,EAAE;IACX,OAAO,IAAI;EACb;;EAEA;EACA,IAAIA,MAAM,CAACC,IAAI,KAAK,SAAS,EAAE;IAC7B,OAAO,0BAA4BD,MAAM,CAACE,KAAK,CAAEA,KAAK;EACxD;EACA;EACA;EACA,OAAO,IAAI;AACb,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,aAAa,GAAG,SAAAA,CAAUC,IAAI,EAAEC,OAAO,EAAEC,KAAK,EAAEC,IAAI,EAAE;EAC1D,IAAIA,IAAI,CAACC,gBAAgB,EAAE;IACzB;IACA,MAAMC,iBAAiB,GAAGZ,UAAU,CAAC,CAAC;IACtCY,iBAAiB,CAACR,IAAI,GAAG,SAAS;IAClCQ,iBAAiB,CAACP,KAAK,GAAG;MACxBA,K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,IAAI,KAAK,mBAAmB;AACzC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM6F,mBAAmB,GAAG,SAAAA,CAAU1F,IAAI,EAAE2F,UAAU,EAAEjF,GAAG,EAAEkF,QAAQ,EAAE;EACrE;EACA;EACA,IAAIlF,GAAG,CAACuE,GAAG,EAAE;IACX,IAAIM,SAAS,CAACvF,IAAI,CAAC,IACjBA,IAAI,CAACkB,MAAM,IAAIqE,SAAS,CAACvF,IAAI,CAACkB,MAAM,CAAC,EAAE;MACvC,OAAO,KAAK;IACd;IAEA,MAAM2E,UAAU,GAAG1B,iBAAiB,CAACnE,IAAI,CAAC;;IAE1C;IACA,IAAI6F,UAAU,IAAI,CAAC,IAAAC,8BAAgB,EAACD,UAAU,EAAEF,UAAU,EAAEC,QAAQ,CAAC,EAAE;MACrE,OAAO,IAAI;IACb;;IAEA;AACJ;AACA;IACI,IACEnB,kBAAkB,CAACzE,IAAI,CAAC,IACxB,CAAC,IAAA8F,8BAAgB,EAAC9F,IAAI,EAAE2F,UAAU,EAAEC,QAAQ,CAAC,EAC7C;MACA,OAAO,IAAI;IACb;EACF;EAEA,MAAMP,GAAG,GAAG,sBAAwBM,UAAU,CAACN,GAAI;EAEnD,MAAMU,WAAW,GAAGX,KAAK,CACvB;EACCC,GAAG,EACJrF,IAAI,EACJU,GACF,CAAC;EAED,OAAOkE,cAAc,CACnB5E,IAAI,EAAE,0BAA4B+F,WAAW,CAACZ,UAAU,EAAGzE,GAC7D,CAAC;AACH,CAAC;AAAC,IAAAsF,QAAA,GAAAjB,OAAA,CAAAzF,OAAA,GAEa;EACboG,mBAAmB;EACnBN;AACF,CAAC;AAAAN,MAAA,CAAAC,OAAA,GAAAA,OAAA,CAAAzF,OAAA","ignoreList":[]}
|
package/dist/index-cjs.cjs
CHANGED
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = void 0;
|
|
6
|
+
exports.default = exports.buildForbidRuleDefinition = void 0;
|
|
7
7
|
var _getJsdocProcessorPlugin = require("./getJsdocProcessorPlugin.cjs");
|
|
8
|
+
var _iterateJsdoc = _interopRequireDefault(require("./iterateJsdoc.cjs"));
|
|
8
9
|
var _checkAccess = _interopRequireDefault(require("./rules/checkAccess.cjs"));
|
|
9
10
|
var _checkAlignment = _interopRequireDefault(require("./rules/checkAlignment.cjs"));
|
|
10
11
|
var _checkExamples = _interopRequireDefault(require("./rules/checkExamples.cjs"));
|
|
@@ -64,6 +65,80 @@ var _textEscaping = _interopRequireDefault(require("./rules/textEscaping.cjs"));
|
|
|
64
65
|
var _typeFormatting = _interopRequireDefault(require("./rules/typeFormatting.cjs"));
|
|
65
66
|
var _validTypes = _interopRequireDefault(require("./rules/validTypes.cjs"));
|
|
66
67
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
68
|
+
/**
|
|
69
|
+
* @param {{
|
|
70
|
+
* contexts: (string|{
|
|
71
|
+
* comment: string,
|
|
72
|
+
* context: string,
|
|
73
|
+
* message: string
|
|
74
|
+
* })[],
|
|
75
|
+
* description?: string,
|
|
76
|
+
* contextName?: string
|
|
77
|
+
* url?: string,
|
|
78
|
+
* }} cfg
|
|
79
|
+
* @returns {import('@eslint/core').RuleDefinition<
|
|
80
|
+
* import('@eslint/core').RuleDefinitionTypeOptions
|
|
81
|
+
* >}
|
|
82
|
+
*/
|
|
83
|
+
const buildForbidRuleDefinition = ({
|
|
84
|
+
contextName,
|
|
85
|
+
contexts,
|
|
86
|
+
description,
|
|
87
|
+
url
|
|
88
|
+
}) => {
|
|
89
|
+
return (0, _iterateJsdoc.default)(({
|
|
90
|
+
// context,
|
|
91
|
+
info: {
|
|
92
|
+
comment
|
|
93
|
+
},
|
|
94
|
+
report,
|
|
95
|
+
utils
|
|
96
|
+
}) => {
|
|
97
|
+
const {
|
|
98
|
+
contextStr,
|
|
99
|
+
foundContext
|
|
100
|
+
} = utils.findContext(contexts, comment);
|
|
101
|
+
|
|
102
|
+
// We are not on the *particular* matching context/comment, so don't assume
|
|
103
|
+
// we need reporting
|
|
104
|
+
if (!foundContext) {
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
const message = /** @type {import('./iterateJsdoc.js').ContextObject} */foundContext?.message ?? 'Syntax is restricted: {{context}}' + (comment ? ' with {{comment}}' : '');
|
|
108
|
+
report(message, null, null, comment ? {
|
|
109
|
+
comment,
|
|
110
|
+
context: contextStr
|
|
111
|
+
} : {
|
|
112
|
+
context: contextStr
|
|
113
|
+
});
|
|
114
|
+
}, {
|
|
115
|
+
contextSelected: true,
|
|
116
|
+
meta: {
|
|
117
|
+
docs: {
|
|
118
|
+
description: description ?? contextName ?? 'Reports when certain comment structures are present.',
|
|
119
|
+
url: url ?? 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-restricted-syntax.md#repos-sticky-header'
|
|
120
|
+
},
|
|
121
|
+
fixable: 'code',
|
|
122
|
+
schema: [],
|
|
123
|
+
type: 'suggestion'
|
|
124
|
+
},
|
|
125
|
+
modifyContext: context => {
|
|
126
|
+
// Reproduce context object with our own `contexts`
|
|
127
|
+
const propertyDescriptors = Object.getOwnPropertyDescriptors(context);
|
|
128
|
+
return Object.create(Object.getPrototypeOf(context), {
|
|
129
|
+
...propertyDescriptors,
|
|
130
|
+
options: {
|
|
131
|
+
...propertyDescriptors.options,
|
|
132
|
+
value: [{
|
|
133
|
+
contexts
|
|
134
|
+
}]
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
},
|
|
138
|
+
nonGlobalSettings: true
|
|
139
|
+
});
|
|
140
|
+
};
|
|
141
|
+
|
|
67
142
|
/* eslint-disable jsdoc/valid-types -- Bug */
|
|
68
143
|
/**
|
|
69
144
|
* @typedef {"recommended" | "stylistic" | "contents" | "logical" | "requirements"} ConfigGroups
|
|
@@ -74,6 +149,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
74
149
|
* import('eslint').Linter.Config>
|
|
75
150
|
* }}
|
|
76
151
|
*/
|
|
152
|
+
exports.buildForbidRuleDefinition = buildForbidRuleDefinition;
|
|
77
153
|
const index = {};
|
|
78
154
|
/* eslint-enable jsdoc/valid-types -- Bug */
|
|
79
155
|
index.configs = {};
|
|
@@ -115,6 +191,15 @@ index.rules = {
|
|
|
115
191
|
'require-file-overview': _requireFileOverview.default,
|
|
116
192
|
'require-hyphen-before-param-description': _requireHyphenBeforeParamDescription.default,
|
|
117
193
|
'require-jsdoc': _requireJsdoc.default,
|
|
194
|
+
'require-next-type': buildForbidRuleDefinition({
|
|
195
|
+
contexts: [{
|
|
196
|
+
comment: 'JsdocBlock:has(JsdocTag[tag=next]:not([parsedType.type]))',
|
|
197
|
+
context: 'any',
|
|
198
|
+
message: '@next should have a type'
|
|
199
|
+
}],
|
|
200
|
+
description: 'Requires a type for @next tags',
|
|
201
|
+
url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-next-type.md#repos-sticky-header'
|
|
202
|
+
}),
|
|
118
203
|
'require-param': _requireParam.default,
|
|
119
204
|
'require-param-description': _requireParamDescription.default,
|
|
120
205
|
'require-param-name': _requireParamName.default,
|
|
@@ -129,8 +214,26 @@ index.rules = {
|
|
|
129
214
|
'require-returns-type': _requireReturnsType.default,
|
|
130
215
|
'require-template': _requireTemplate.default,
|
|
131
216
|
'require-throws': _requireThrows.default,
|
|
217
|
+
'require-throws-type': buildForbidRuleDefinition({
|
|
218
|
+
contexts: [{
|
|
219
|
+
comment: 'JsdocBlock:has(JsdocTag[tag=throws]:not([parsedType.type]))',
|
|
220
|
+
context: 'any',
|
|
221
|
+
message: '@throws should have a type'
|
|
222
|
+
}],
|
|
223
|
+
description: 'Requires a type for @throws tags',
|
|
224
|
+
url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-throws-type.md#repos-sticky-header'
|
|
225
|
+
}),
|
|
132
226
|
'require-yields': _requireYields.default,
|
|
133
227
|
'require-yields-check': _requireYieldsCheck.default,
|
|
228
|
+
'require-yields-type': buildForbidRuleDefinition({
|
|
229
|
+
contexts: [{
|
|
230
|
+
comment: 'JsdocBlock:has(JsdocTag[tag=yields]:not([parsedType.type]))',
|
|
231
|
+
context: 'any',
|
|
232
|
+
message: '@yields should have a type'
|
|
233
|
+
}],
|
|
234
|
+
description: 'Requires a type for @yields tags',
|
|
235
|
+
url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-yields-type.md#repos-sticky-header'
|
|
236
|
+
}),
|
|
134
237
|
'sort-tags': _sortTags.default,
|
|
135
238
|
'tag-lines': _tagLines.default,
|
|
136
239
|
'text-escaping': _textEscaping.default,
|
|
@@ -190,6 +293,7 @@ const createRecommendedRuleset = (warnOrError, flatName) => {
|
|
|
190
293
|
'jsdoc/require-file-overview': 'off',
|
|
191
294
|
'jsdoc/require-hyphen-before-param-description': 'off',
|
|
192
295
|
'jsdoc/require-jsdoc': warnOrError,
|
|
296
|
+
'jsdoc/require-next-type': warnOrError,
|
|
193
297
|
'jsdoc/require-param': warnOrError,
|
|
194
298
|
'jsdoc/require-param-description': warnOrError,
|
|
195
299
|
'jsdoc/require-param-name': warnOrError,
|
|
@@ -204,8 +308,10 @@ const createRecommendedRuleset = (warnOrError, flatName) => {
|
|
|
204
308
|
'jsdoc/require-returns-type': warnOrError,
|
|
205
309
|
'jsdoc/require-template': 'off',
|
|
206
310
|
'jsdoc/require-throws': 'off',
|
|
311
|
+
'jsdoc/require-throws-type': warnOrError,
|
|
207
312
|
'jsdoc/require-yields': warnOrError,
|
|
208
313
|
'jsdoc/require-yields-check': warnOrError,
|
|
314
|
+
'jsdoc/require-yields-type': warnOrError,
|
|
209
315
|
'jsdoc/sort-tags': 'off',
|
|
210
316
|
'jsdoc/tag-lines': warnOrError,
|
|
211
317
|
'jsdoc/text-escaping': 'off',
|
|
@@ -287,7 +393,7 @@ const createContentsTypescriptFlavorRuleset = createStandaloneRulesetFactory(con
|
|
|
287
393
|
const logicalRules = ['jsdoc/check-access', 'jsdoc/check-param-names', 'jsdoc/check-property-names', 'jsdoc/check-syntax', 'jsdoc/check-tag-names', 'jsdoc/check-template-names', 'jsdoc/check-types', 'jsdoc/check-values', 'jsdoc/empty-tags', 'jsdoc/implements-on-classes', 'jsdoc/require-returns-check', 'jsdoc/require-yields-check', 'jsdoc/no-bad-blocks', 'jsdoc/no-defaults', 'jsdoc/no-types', 'jsdoc/no-undefined-types', 'jsdoc/valid-types'];
|
|
288
394
|
const createLogicalTypescriptRuleset = createStandaloneRulesetFactory(logicalRules);
|
|
289
395
|
const createLogicalTypescriptFlavorRuleset = createStandaloneRulesetFactory(logicalRules);
|
|
290
|
-
const requirementsRules = ['jsdoc/require-example', 'jsdoc/require-jsdoc', 'jsdoc/require-param', 'jsdoc/require-param-description', 'jsdoc/require-param-name', 'jsdoc/require-property', 'jsdoc/require-property-description', 'jsdoc/require-property-name', 'jsdoc/require-returns', 'jsdoc/require-returns-description', 'jsdoc/require-yields'];
|
|
396
|
+
const requirementsRules = ['jsdoc/require-example', 'jsdoc/require-jsdoc', 'jsdoc/require-next-type', 'jsdoc/require-param', 'jsdoc/require-param-description', 'jsdoc/require-param-name', 'jsdoc/require-property', 'jsdoc/require-property-description', 'jsdoc/require-property-name', 'jsdoc/require-returns', 'jsdoc/require-returns-description', 'jsdoc/require-throws-type', 'jsdoc/require-yields', 'jsdoc/require-yields-type'];
|
|
291
397
|
const createRequirementsTypeScriptRuleset = createStandaloneRulesetFactory(requirementsRules);
|
|
292
398
|
const createRequirementsTypeScriptFlavorRuleset = createStandaloneRulesetFactory([...requirementsRules, 'jsdoc/require-param-type', 'jsdoc/require-property-type', 'jsdoc/require-returns-type', 'jsdoc/require-template']);
|
|
293
399
|
const stylisticRules = ['jsdoc/check-alignment', 'jsdoc/check-line-alignment', 'jsdoc/lines-before-block', 'jsdoc/multiline-blocks', 'jsdoc/no-multi-asterisks', 'jsdoc/require-asterisk-prefix', ['jsdoc/require-hyphen-before-param-description', 'never'], 'jsdoc/tag-lines'];
|
|
@@ -408,5 +514,4 @@ index.configs['examples-and-default-expressions'] = /** @type {import('eslint').
|
|
|
408
514
|
};
|
|
409
515
|
})];
|
|
410
516
|
var _default = exports.default = index;
|
|
411
|
-
module.exports = exports.default;
|
|
412
517
|
//# sourceMappingURL=index-cjs.cjs.map
|