From 7a6b7db123672d7c65004e5b8c8f9d3cab16bd64 Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Wed, 1 Oct 2025 03:00:57 +0900 Subject: [PATCH] feat(`escape-inline-tags`): add new rule (#1547) Also: - chore: update jsdoccomment and devDeps. - docs: improve linebreaks Now parses identifiers sans hyphens and avoiding treating NaN and Infinity as numbers --- .README/README.md | 1 + .README/rules/escape-inline-tags.md | 34 ++ README.md | 2 + docs/rules/check-line-alignment.md | 8 + docs/rules/check-param-names.md | 7 + docs/rules/check-tag-names.md | 4 + docs/rules/check-types.md | 4 + docs/rules/check-values.md | 3 + docs/rules/convert-to-jsdoc-comments.md | 4 + docs/rules/empty-tags.md | 1 - docs/rules/escape-inline-tags.md | 204 +++++++++ docs/rules/informative-docs.md | 1 - docs/rules/match-description.md | 3 + docs/rules/match-name.md | 6 + docs/rules/multiline-blocks.md | 5 + docs/rules/no-defaults.md | 1 + docs/rules/no-multi-asterisks.md | 2 + docs/rules/no-types.md | 1 - docs/rules/no-undefined-types.md | 3 + docs/rules/prefer-import-tag.md | 2 + docs/rules/require-asterisk-prefix.md | 2 + .../require-description-complete-sentence.md | 3 +- docs/rules/require-description.md | 5 + docs/rules/require-example.md | 6 + docs/rules/require-file-overview.md | 2 - ...require-hyphen-before-param-description.md | 2 +- docs/rules/require-jsdoc.md | 16 + docs/rules/require-param-description.md | 2 + docs/rules/require-param-name.md | 1 - docs/rules/require-param-type.md | 2 + docs/rules/require-param.md | 10 + docs/rules/require-returns-check.md | 2 + docs/rules/require-returns.md | 8 +- docs/rules/require-template.md | 2 +- docs/rules/require-throws.md | 1 + docs/rules/require-yields-check.md | 2 + docs/rules/require-yields.md | 6 + docs/rules/sort-tags.md | 4 + docs/rules/tag-lines.md | 5 + docs/rules/text-escaping.md | 1 + docs/rules/type-formatting.md | 11 + package.json | 14 +- pnpm-lock.yaml | 314 ++++++++++--- src/bin/generateDocs.js | 13 +- src/index-cjs.js | 4 + src/index.js | 4 + src/rules.d.ts | 62 ++- src/rules/checkLineAlignment.js | 3 +- src/rules/convertToJsdocComments.js | 6 +- src/rules/emptyTags.js | 3 +- src/rules/escapeInlineTags.js | 189 ++++++++ src/rules/informativeDocs.js | 9 +- src/rules/linesBeforeBlock.js | 12 +- src/rules/matchDescription.js | 6 +- src/rules/matchName.js | 3 +- src/rules/multilineBlocks.js | 9 +- src/rules/noBadBlocks.js | 3 +- src/rules/noTypes.js | 3 +- src/rules/requireAsteriskPrefix.js | 3 +- .../requireDescriptionCompleteSentence.js | 3 +- src/rules/requireFileOverview.js | 4 +- .../requireHyphenBeforeParamDescription.js | 3 +- src/rules/requireJsdoc.js | 9 +- src/rules/requireParam.js | 18 +- src/rules/requireParamName.js | 3 +- src/rules/requireReturns.js | 3 +- src/rules/requireTemplate.js | 3 +- src/rules/sortTags.js | 3 +- test/rules/assertions/checkAlignment.js | 6 +- test/rules/assertions/escapeInlineTags.js | 415 ++++++++++++++++++ test/rules/ruleNames.json | 1 + 71 files changed, 1310 insertions(+), 210 deletions(-) create mode 100644 .README/rules/escape-inline-tags.md create mode 100644 docs/rules/escape-inline-tags.md create mode 100644 src/rules/escapeInlineTags.js create mode 100644 test/rules/assertions/escapeInlineTags.js diff --git a/.README/README.md b/.README/README.md index 478f0df39..5322cae4b 100644 --- a/.README/README.md +++ b/.README/README.md @@ -227,6 +227,7 @@ Finally, enable all of the rules that you would like to use. "jsdoc/check-values": 1, // Recommended "jsdoc/convert-to-jsdoc-comments": 1, "jsdoc/empty-tags": 1, // Recommended + "jsdoc/escape-inline-tags": 1, // Recommended for TS configs "jsdoc/implements-on-classes": 1, // Recommended "jsdoc/imports-as-dependencies": 1, "jsdoc/informative-docs": 1, diff --git a/.README/rules/escape-inline-tags.md b/.README/rules/escape-inline-tags.md new file mode 100644 index 000000000..b0b04423e --- /dev/null +++ b/.README/rules/escape-inline-tags.md @@ -0,0 +1,34 @@ +# `escape-inline-tags` + +Reports use of JSDoc tags in non-tag positions (in the default "typescript" mode). + +Note that while the JSDoc standard refers to inline tags as those being surrounded +by curly brackets, such as those in the form `{@link https://example.com}`, for the +purposes of this rule, we are referring to inline tags as a simple reference to +tags such as `@param` outside of the normal location of a tag and which may need to +be wrapped in `{}` to be proper inline JSDoc or need to be escaped with `\` or +wrapped with ` to be normal text. E.g. + +```js +/** Supports shorthands such as `@yearly` to simplify setup. */ +``` + +## Options + +{"gitdown": "options"} + +||| +|---|---| +|Context|everywhere| +|Tags|``| +|Recommended|true (unless `mode` is changed away from "typescript")| +|Settings|`mode`| +|Options|`allowedInlineTags`, `enableFixer`, `fixType`| + +## Failing examples + + + +## Passing examples + + diff --git a/README.md b/README.md index 96652fff4..5d0c06dd4 100644 --- a/README.md +++ b/README.md @@ -254,6 +254,7 @@ Finally, enable all of the rules that you would like to use. "jsdoc/check-values": 1, // Recommended "jsdoc/convert-to-jsdoc-comments": 1, "jsdoc/empty-tags": 1, // Recommended + "jsdoc/escape-inline-tags": 1, // Recommended for TS configs "jsdoc/implements-on-classes": 1, // Recommended "jsdoc/imports-as-dependencies": 1, "jsdoc/informative-docs": 1, @@ -442,6 +443,7 @@ non-default-recommended fixer). |:heavy_check_mark:|| [check-values](./docs/rules/check-values.md#readme) | This rule checks the values for a handful of tags: `@version`, `@since`, `@license` and `@author`. | ||:wrench:| [convert-to-jsdoc-comments](./docs/rules/convert-to-jsdoc-comments.md#readme) | Converts non-JSDoc comments preceding or following nodes into JSDoc ones | |: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 | +|:heavy_check_mark:|:wrench:| [escape-inline-tags](./docs/rules/escape-inline-tags.md#readme) | Reports use of JSDoc tags in non-tag positions (in the default "typescript" mode). | |: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). | ||| [imports-as-dependencies](./docs/rules/imports-as-dependencies.md#readme) | Reports if JSDoc `import()` statements point to a package which is not listed in `dependencies` or `devDependencies` | ||| [informative-docs](./docs/rules/informative-docs.md#readme) | This rule reports doc comments that only restate their attached name. | diff --git a/docs/rules/check-line-alignment.md b/docs/rules/check-line-alignment.md index 8e7368d90..08f2b11c9 100644 --- a/docs/rules/check-line-alignment.md +++ b/docs/rules/check-line-alignment.md @@ -56,43 +56,51 @@ If a spacing is not defined, it defaults to one. #### postDelimiter Affects spacing after the asterisk (e.g., `* @param`) + #### postHyphen Affects spacing after any hyphens in the description (e.g., `* @param {someType} name - A description`) + #### postName Affects spacing after the name (e.g., `* @param {someType} name `) + #### postTag Affects spacing after the tag (e.g., `* @param `) + #### postType Affects spacing after the type (e.g., `* @param {someType} `) + ### disableWrapIndent Disables `wrapIndent`; existing wrap indentation is preserved without changes. + ### preserveMainDescriptionPostDelimiter A boolean to determine whether to preserve the post-delimiter spacing of the main description. If `false` or unset, will be set to a single space. + ### tags Use this to change the tags which are sought for alignment changes. Defaults to an array of `['param', 'arg', 'argument', 'property', 'prop', 'returns', 'return', 'template']`. + ### wrapIndent diff --git a/docs/rules/check-param-names.md b/docs/rules/check-param-names.md index 5ab6f00d2..a985e0ec1 100644 --- a/docs/rules/check-param-names.md +++ b/docs/rules/check-param-names.md @@ -72,11 +72,13 @@ If set to `true`, this option will allow extra `@param` definitions (e.g., representing future expected or virtual params) to be present without needing their presence within the function signature. Other inconsistencies between `@param`'s and present function parameters will still be reported. + ### checkDestructured Whether to check destructured properties. Defaults to `true`. + ### checkRestProperty @@ -84,6 +86,7 @@ Whether to check destructured properties. Defaults to `true`. If set to `true`, will require that rest properties are documented and that any extraneous properties (which may have been within the rest property) are documented. Defaults to `false`. + ### checkTypesPattern @@ -123,6 +126,7 @@ your expression as a string, but like a literal, e.g., `/^object$/vi`. You could set this regular expression to a more expansive list, or you could restrict it such that even types matching those strings would not need destructuring. + ### disableExtraPropertyReporting @@ -134,11 +138,13 @@ their own types. Note that extra properties will always be reported if another item at the same level is destructured as destructuring will prevent other access and this option is only intended to permit documenting extra properties that are available and actually used in the function. + ### disableMissingParamChecks Whether to avoid checks for missing `@param` definitions. Defaults to `false`. Change to `true` if you want to be able to omit properties. + ### enableFixer @@ -149,6 +155,7 @@ names). Note that this option will remove duplicates of the same name even if the definitions do not match in other ways (e.g., the second param will be removed even if it has a different type or description). + ### useDefaultObjectProperties diff --git a/docs/rules/check-tag-names.md b/docs/rules/check-tag-names.md index 0b577a4b8..dc76ac6da 100644 --- a/docs/rules/check-tag-names.md +++ b/docs/rules/check-tag-names.md @@ -238,11 +238,13 @@ The format is as follows: "definedTags": ["note", "record"] } ``` + ### enableFixer Set to `false` to disable auto-removal of types that are redundant with the [`typed` option](#user-content-typed). + ### inlineTags @@ -250,6 +252,7 @@ Set to `false` to disable auto-removal of types that are redundant with the [`ty List of tags to allow inline. Defaults to array of `'link', 'linkcode', 'linkplain', 'tutorial'` + ### jsxTags @@ -264,6 +267,7 @@ jsxRuntime ``` For more information, see the [babel documentation](https://babeljs.io/docs/en/babel-plugin-transform-react-jsx). + ### typed diff --git a/docs/rules/check-types.md b/docs/rules/check-types.md index b03d5b513..df2522cc5 100644 --- a/docs/rules/check-types.md +++ b/docs/rules/check-types.md @@ -45,6 +45,7 @@ A single options object has the following properties. ### exemptTagContexts Avoids reporting when a bad type is found on a specified tag. + A single options object has the following properties. @@ -52,6 +53,7 @@ A single options object has the following properties. ##### tag Set a key `tag` to the tag to exempt + ##### types @@ -65,6 +67,7 @@ behavior of `settings.jsdoc.preferredTypes`. This option is useful for normally restricting generic types like `object` with `preferredTypes`, but allowing `typedef` to indicate that its base type is `object`. + ### noDefaults @@ -72,6 +75,7 @@ type is `object`. Insists that only the supplied option type map is to be used, and that the default preferences (such as "string" over "String") will not be enforced. The option's default is `false`. + ### unifyParentAndChildTypeChecks diff --git a/docs/rules/check-values.md b/docs/rules/check-values.md index c0f311159..e2a3a56ec 100644 --- a/docs/rules/check-values.md +++ b/docs/rules/check-values.md @@ -42,12 +42,14 @@ A single options object has the following properties. An array of allowable author values. If absent, only non-whitespace will be checked for. + ### allowedLicenses An array of allowable license values or `true` to allow any license text. If present as an array, will be used in place of [SPDX identifiers](https://spdx.org/licenses/). + ### licensePattern @@ -62,6 +64,7 @@ Note that the `/` delimiters are optional, but necessary to add flags. Defaults to using the `v` flag, so to add your own flags, encapsulate your expression as a string, but like a literal, e.g., `/^mit$/vi`. + ### numericOnlyVariation diff --git a/docs/rules/convert-to-jsdoc-comments.md b/docs/rules/convert-to-jsdoc-comments.md index 62eff8750..2aff96a76 100644 --- a/docs/rules/convert-to-jsdoc-comments.md +++ b/docs/rules/convert-to-jsdoc-comments.md @@ -28,6 +28,7 @@ An array of prefixes to allow at the beginning of a comment. Defaults to `['@ts-', 'istanbul ', 'c8 ', 'v8 ', 'eslint', 'prettier-']`. Supplying your own value overrides the defaults. + ### contexts @@ -48,6 +49,7 @@ The contexts array which will be checked for content on the same line after. Can either be strings or an object with a `context` string and an optional, default `false` `inlineCommentBlock` boolean. Defaults to an empty array. + ### contextsBeforeAndAfter @@ -58,11 +60,13 @@ line after. Can either be strings or an object with a `context` string and an optional, default `false` `inlineCommentBlock` boolean. Defaults to `VariableDeclarator`, `TSPropertySignature`, `PropertyDefinition`. + ### enableFixer Set to `false` to disable fixing. + ### enforceJsdocLineStyle diff --git a/docs/rules/empty-tags.md b/docs/rules/empty-tags.md index a10f8188e..05a3f6b36 100644 --- a/docs/rules/empty-tags.md +++ b/docs/rules/empty-tags.md @@ -61,7 +61,6 @@ add them within this option. ``` - ## Context and settings diff --git a/docs/rules/escape-inline-tags.md b/docs/rules/escape-inline-tags.md new file mode 100644 index 000000000..3eca794ad --- /dev/null +++ b/docs/rules/escape-inline-tags.md @@ -0,0 +1,204 @@ + + +# escape-inline-tags + +Reports use of JSDoc tags in non-tag positions (in the default "typescript" mode). + +Note that while the JSDoc standard refers to inline tags as those being surrounded +by curly brackets, such as those in the form `{@link https://example.com}`, for the +purposes of this rule, we are referring to inline tags as a simple reference to +tags such as `@param` outside of the normal location of a tag and which may need to +be wrapped in `{}` to be proper inline JSDoc or need to be escaped with `\` or +wrapped with ` to be normal text. E.g. + +```js +/** Supports shorthands such as `@yearly` to simplify setup. */ +``` + + + +## Options + +A single options object has the following properties. + + + +### allowedInlineTags + +A listing of tags you wish to allow unescaped. Defaults to an empty array. + + + +### enableFixer + +Whether to enable the fixer. Defaults to `false`. + + + +### fixType + +How to escape the inline tag. + +May be "backticks" to enclose tags in backticks (treating as code segments), or +"backslash" to escape tags with a backslash, i.e., `\@` + +Defaults to "backslash". + + +||| +|---|---| +|Context|everywhere| +|Tags|``| +|Recommended|true (unless `mode` is changed away from "typescript")| +|Settings|`mode`| +|Options|`allowedInlineTags`, `enableFixer`, `fixType`| + + + +## Failing examples + +The following patterns are considered problems: + +````ts +/** + * + * Whether to include a @yearly, @monthly etc text labels in the generated expression. + */ +// "jsdoc/escape-inline-tags": ["error"|"warn", {"enableFixer":true}] +// Message: Unexpected inline JSDoc tag. Did you mean to use {@yearly}, \@yearly, or `@yearly`? + +/** + * Some text + * Whether to include a @yearly, @monthly etc text labels in the generated expression. + */ +// "jsdoc/escape-inline-tags": ["error"|"warn", {"enableFixer":true}] +// Message: Unexpected inline JSDoc tag. Did you mean to use {@yearly}, \@yearly, or `@yearly`? + +/** + * Whether to include a @yearly, @yearly etc text labels in the generated expression. + */ +// "jsdoc/escape-inline-tags": ["error"|"warn", {"enableFixer":true}] +// Message: Unexpected inline JSDoc tag. Did you mean to use {@yearly}, \@yearly, or `@yearly`? + +/** + * Whether to include a @yearly, + * or @yearly etc text labels in the generated expression. + */ +// "jsdoc/escape-inline-tags": ["error"|"warn", {"enableFixer":true}] +// Message: Unexpected inline JSDoc tag. Did you mean to use {@yearly}, \@yearly, or `@yearly`? + +/** + * Whether to include a @yearly, @monthly etc text labels in the generated expression. + */ +// "jsdoc/escape-inline-tags": ["error"|"warn", {"allowedInlineTags":["monthly"],"enableFixer":true,"fixType":"backticks"}] +// Message: Unexpected inline JSDoc tag. Did you mean to use {@yearly}, \@yearly, or `@yearly`? + +/** + * Some description @sth + */ +// "jsdoc/escape-inline-tags": ["error"|"warn", {"enableFixer":true}] +// Message: Unexpected inline JSDoc tag. Did you mean to use {@sth}, \@sth, or `@sth`? + +/** + * Some description @sth + */ +// "jsdoc/escape-inline-tags": ["error"|"warn", {"enableFixer":false}] +// Message: Unexpected inline JSDoc tag. Did you mean to use {@sth}, \@sth, or `@sth`? + +/** + * @param includeNonStandard Whether to include a @yearly, @monthly etc text labels in the generated expression. + */ +// "jsdoc/escape-inline-tags": ["error"|"warn", {"enableFixer":true}] +// Message: Unexpected inline JSDoc tag. Did you mean to use {@yearly}, \@yearly, or `@yearly`? + +/** + * @param includeNonStandard Whether to include a @yearly, @monthly etc text labels in the generated expression. + */ +// "jsdoc/escape-inline-tags": ["error"|"warn", {"allowedInlineTags":["monthly"],"enableFixer":true,"fixType":"backticks"}] +// Message: Unexpected inline JSDoc tag. Did you mean to use {@yearly}, \@yearly, or `@yearly`? + +/** + * @param aName @sth + */ +// "jsdoc/escape-inline-tags": ["error"|"warn", {"enableFixer":true}] +// Message: Unexpected inline JSDoc tag. Did you mean to use {@sth}, \@sth, or `@sth`? + +/** + * @param aName @sth + * and @another + * @param anotherName @yetAnother + */ +// "jsdoc/escape-inline-tags": ["error"|"warn", {"enableFixer":true}] +// Message: Unexpected inline JSDoc tag. Did you mean to use {@sth}, \@sth, or `@sth`? + +/** + * @param aName @sth + */ +// "jsdoc/escape-inline-tags": ["error"|"warn", {"enableFixer":false}] +// Message: Unexpected inline JSDoc tag. Did you mean to use {@sth}, \@sth, or `@sth`? +```` + + + + + +## Passing examples + +The following patterns are not considered problems: + +````ts +/** + * A description with an escaped \@tag. + */ + +/** + * A description with a markdown `@tag`. + */ + +/** + * A description with a non@tag. + */ + +/** + * @param {SomeType} aName A description with an escaped \@tag. + */ + +/** + * @param {SomeType} aName A description with a markdown `@tag`. + */ + +/** + * @param {SomeType} aName A description with a non@tag. + */ + +/** + * {@link https://example.com} + */ + +/** + * A description with a {@link https://example.com} + */ + +/** + * @someTag {@link https://example.com} + */ + +/** + * @param {SomeType} aName {@link https://example.com} + */ + +/** + * @param {SomeType} aName A description with a {@link https://example.com}. + */ + +/** + * @example + * Here are some unescaped tags: @yearly, @monthly + */ + +/** + * Whether to include a @yearly, @monthly etc text labels in the generated expression. + */ +// Settings: {"jsdoc":{"mode":"jsdoc"}} +```` + diff --git a/docs/rules/informative-docs.md b/docs/rules/informative-docs.md index 4d36969a6..499d97a41 100644 --- a/docs/rules/informative-docs.md +++ b/docs/rules/informative-docs.md @@ -87,7 +87,6 @@ The default `uselessWords` option is: ``` - ## Context and settings diff --git a/docs/rules/match-description.md b/docs/rules/match-description.md index 04d288059..ea4746579 100644 --- a/docs/rules/match-description.md +++ b/docs/rules/match-description.md @@ -107,6 +107,7 @@ You may also provide an object with `message`: }] } ``` + ### matchDescription @@ -123,6 +124,7 @@ literal, e.g., `/[A-Z].*\./vi`. 'jsdoc/match-description': ['error', {matchDescription: '[A-Z].*\\.'}] } ``` + ### message @@ -154,6 +156,7 @@ some content: If you supply your own tag description for any of the above tags in `tags`, your description will take precedence. + ### tags diff --git a/docs/rules/match-name.md b/docs/rules/match-name.md index 96d653549..a647c14c1 100644 --- a/docs/rules/match-name.md +++ b/docs/rules/match-name.md @@ -52,11 +52,13 @@ A single options object has the following properties. Indicates which names are allowed for the given tag (or `*`). Accepts a string regular expression (optionally wrapped between two `/` delimiters followed by optional flags) used to match the name. + ##### comment As with `context` but AST for the JSDoc block comment and types. + ##### context @@ -65,22 +67,26 @@ AST to confine the allowing or disallowing to JSDoc blocks associated with a particular context. See the ["AST and Selectors"](#user-content-eslint-plugin-jsdoc-advanced-ast-and-selectors) section of our Advanced docs for more on the expected format. + ##### disallowName As with `allowName` but indicates names that are not allowed. + ##### message An optional custom message to use when there is a match. + ##### replacement If `disallowName` is supplied and this value is present, it will replace the matched `disallowName` text. + ##### tags diff --git a/docs/rules/multiline-blocks.md b/docs/rules/multiline-blocks.md index 265c4aeab..d9c14d51f 100644 --- a/docs/rules/multiline-blocks.md +++ b/docs/rules/multiline-blocks.md @@ -41,6 +41,7 @@ tag (since a description cannot precede a tag on a single line, and also cannot be reliably added after the tag either). Defaults to `true`. + ### minimumLengthForMultiline @@ -52,6 +53,7 @@ If not set, multiline blocks will not be permitted regardless of length unless a relevant tag is present and `multilineTags` is set. Defaults to not being in effect. + ### multilineTags @@ -81,6 +83,7 @@ line will be reported. (Text preceding a newline is not reported.) `noMultilineBlocks` will have priority over this rule if it applies. Defaults to `true`. + ### noMultilineBlocks @@ -90,6 +93,7 @@ by the options `minimumLengthForMultiline`, `multilineTags`, or `allowMultipleTags`. Defaults to `false`. + ### noSingleLineBlocks @@ -109,6 +113,7 @@ space will be reported. (Text after a newline is not reported.) `noMultilineBlocks` will have priority over this rule if it applies. Defaults to `true`. + ### requireSingleLineUnderCount diff --git a/docs/rules/no-defaults.md b/docs/rules/no-defaults.md index 648763355..5e0aee257 100644 --- a/docs/rules/no-defaults.md +++ b/docs/rules/no-defaults.md @@ -53,6 +53,7 @@ expression, i.e., `@callback` or `@function` (or its aliases `@func` or See the ["AST and Selectors"](#user-content-eslint-plugin-jsdoc-advanced-ast-and-selectors) section of our Advanced docs for more on the expected format. + ### noOptionalParamNames diff --git a/docs/rules/no-multi-asterisks.md b/docs/rules/no-multi-asterisks.md index 92efc9ea0..1e73c1a58 100644 --- a/docs/rules/no-multi-asterisks.md +++ b/docs/rules/no-multi-asterisks.md @@ -35,6 +35,7 @@ Set to `true` if you wish to allow asterisks after a space (as with Markdown): ``` Defaults to `false`. + ### preventAtEnd @@ -49,6 +50,7 @@ Prevent the likes of this: ``` Defaults to `true`. + ### preventAtMiddleLines diff --git a/docs/rules/no-types.md b/docs/rules/no-types.md index a74f3370b..d49772db5 100644 --- a/docs/rules/no-types.md +++ b/docs/rules/no-types.md @@ -51,7 +51,6 @@ See the ["AST and Selectors"](#user-content-eslint-plugin-jsdoc-advanced-ast-and section of our Advanced docs for more on the expected format. - ## Context and settings diff --git a/docs/rules/no-undefined-types.md b/docs/rules/no-undefined-types.md index 94bb373b8..ac9804a02 100644 --- a/docs/rules/no-undefined-types.md +++ b/docs/rules/no-undefined-types.md @@ -66,6 +66,7 @@ A single options object has the following properties. ### checkUsedTypedefs Whether to check typedefs for use within the file + ### definedTypes @@ -73,6 +74,7 @@ Whether to check typedefs for use within the file This array can be populated to indicate other types which are automatically considered as defined (in addition to globals, etc.). Defaults to an empty array. + ### disableReporting @@ -80,6 +82,7 @@ Defaults to an empty array. Whether to disable reporting of errors. Defaults to `false`. This may be set to `true` in order to take advantage of only marking defined variables as used or checking used typedefs. + ### markVariablesAsUsed diff --git a/docs/rules/prefer-import-tag.md b/docs/rules/prefer-import-tag.md index 40fb8800b..375aaaaf0 100644 --- a/docs/rules/prefer-import-tag.md +++ b/docs/rules/prefer-import-tag.md @@ -22,11 +22,13 @@ A single options object has the following properties. ### enableFixer Whether or not to enable the fixer to add `@import` tags. + ### exemptTypedefs Whether to allow `import()` statements within `@typedef` + ### outputType diff --git a/docs/rules/require-asterisk-prefix.md b/docs/rules/require-asterisk-prefix.md index fd1561555..f8502ac10 100644 --- a/docs/rules/require-asterisk-prefix.md +++ b/docs/rules/require-asterisk-prefix.md @@ -56,11 +56,13 @@ which applies to the main JSDoc block description. If it is `"always"` then a problem is raised when there is no asterisk prefix on a given JSDoc line. + #### any No problem is raised regardless of asterisk presence or non-presence. + #### never diff --git a/docs/rules/require-description-complete-sentence.md b/docs/rules/require-description-complete-sentence.md index fe2750047..70ee25678 100644 --- a/docs/rules/require-description-complete-sentence.md +++ b/docs/rules/require-description-complete-sentence.md @@ -48,6 +48,7 @@ A single options object has the following properties. You can provide an `abbreviations` options array to avoid such strings of text being treated as sentence endings when followed by dots. The `.` is not necessary at the end of the array items. + ### newlineBeforeCapsAssumesBadSentenceEnd @@ -55,6 +56,7 @@ necessary at the end of the array items. When `false` (the new default), we will not assume capital letters after newlines are an incorrect way to end the sentence (they may be proper nouns, for example). + ### tags @@ -81,7 +83,6 @@ description is `some description` while for `@some-tag xyz`, the description is `xyz`). - ## Context and settings diff --git a/docs/rules/require-description.md b/docs/rules/require-description.md index 7d8f5262c..3377e95f2 100644 --- a/docs/rules/require-description.md +++ b/docs/rules/require-description.md @@ -36,18 +36,21 @@ A single options object has the following properties. A value indicating whether `constructor`s should be checked. Defaults to `true`. + ### checkGetters A value indicating whether getters should be checked. Defaults to `true`. + ### checkSetters A value indicating whether setters should be checked. Defaults to `true`. + ### contexts @@ -67,6 +70,7 @@ expression, i.e., `@callback` or `@function` (or its aliases `@func` or See the ["AST and Selectors"](#user-content-eslint-plugin-jsdoc-advanced-ast-and-selectors) section of our Advanced docs for more on the expected format. + ### descriptionStyle @@ -74,6 +78,7 @@ section of our Advanced docs for more on the expected format. Whether to accept implicit descriptions (`"body"`) or `@description` tags (`"tag"`) as satisfying the rule. Set to `"any"` to accept either style. Defaults to `"body"`. + ### exemptedBy diff --git a/docs/rules/require-example.md b/docs/rules/require-example.md index 26c26c6c9..dd10b5d3d 100644 --- a/docs/rules/require-example.md +++ b/docs/rules/require-example.md @@ -39,16 +39,19 @@ A single options object has the following properties. A value indicating whether `constructor`s should be checked. Defaults to `true`. + ### checkGetters A value indicating whether getters should be checked. Defaults to `false`. + ### checkSetters A value indicating whether setters should be checked. Defaults to `false`. + ### contexts @@ -65,12 +68,14 @@ JSDoc block throughout your files. See the ["AST and Selectors"](#user-content-eslint-plugin-jsdoc-advanced-ast-and-selectors) section of our Advanced docs for more on the expected format. + ### enableFixer A boolean on whether to enable the fixer (which adds an empty `@example` block). Defaults to `true`. + ### exemptedBy @@ -80,6 +85,7 @@ block avoids the need for an `@example`. Defaults to an array with `inheritdoc`. If you set this array, it will overwrite the default, so be sure to add back `inheritdoc` if you wish its presence to cause exemption of the rule. + ### exemptNoArguments diff --git a/docs/rules/require-file-overview.md b/docs/rules/require-file-overview.md index 0db0d39c4..3d65141f3 100644 --- a/docs/rules/require-file-overview.md +++ b/docs/rules/require-file-overview.md @@ -90,8 +90,6 @@ in this configuration object regardless of whether you have configured will be checked, but you must use `file` on the configuration object). - - ## Context and settings diff --git a/docs/rules/require-hyphen-before-param-description.md b/docs/rules/require-hyphen-before-param-description.md index 4a60c8078..198746132 100644 --- a/docs/rules/require-hyphen-before-param-description.md +++ b/docs/rules/require-hyphen-before-param-description.md @@ -36,6 +36,7 @@ The next option is an object with the following properties. The options object may have the following property to indicate behavior for other tags besides the `@param` tag (or the `@arg` tag if so set). + ### tags @@ -49,7 +50,6 @@ Object whose keys indicate different tags to check for the other `tags` entries). - ## Context and settings diff --git a/docs/rules/require-jsdoc.md b/docs/rules/require-jsdoc.md index 4a6e904d4..d0c10559d 100644 --- a/docs/rules/require-jsdoc.md +++ b/docs/rules/require-jsdoc.md @@ -42,6 +42,7 @@ A single options object has the following properties. Has the following optional keys. + ### checkConstructors @@ -49,6 +50,7 @@ Has the following optional keys. A value indicating whether `constructor`s should be checked. Defaults to `true`. When `true`, `exemptEmptyConstructors` may still avoid reporting when no parameters or return values are found. + ### checkGetters @@ -68,6 +70,7 @@ boolean, this option can be set to the string `"no-getter"` to indicate that setters should be checked but only when there is no getter. This may be useful if one only wishes documentation on one of the two accessors. Defaults to `false`. + ### contexts @@ -87,12 +90,14 @@ if you are specifying a more precise form in `contexts` (e.g., `MethodDefinition See the ["AST and Selectors"](#user-content-eslint-plugin-jsdoc-advanced-ast-and-selectors) section of our Advanced docs for more on the expected format. + ### enableFixer A boolean on whether to enable the fixer (which adds an empty JSDoc block). Defaults to `true`. + ### exemptEmptyConstructors @@ -102,6 +107,7 @@ with no parameters or return values (this is enabled by default as the class name or description should be seen as sufficient to convey intent). Defaults to `true`. + ### exemptEmptyFunctions @@ -119,12 +125,14 @@ Defaults to `false`. If set to `true` will avoid checking an overloaded function's implementation. Defaults to `false`. + ### fixerMessage An optional message to add to the inserted JSDoc block. Defaults to the empty string. + ### minLineCount @@ -132,6 +140,7 @@ empty string. An integer to indicate a minimum number of lines expected for a node in order for it to require documentation. Defaults to `undefined`. This option will apply to any context; see `contexts` for line counts specific to a context. + ### publicOnly @@ -158,36 +167,43 @@ A single options object has the following properties. An object with the following optional boolean keys which all default to `false` except for `FunctionDeclaration` which defaults to `true`. + #### ArrowFunctionExpression Whether to check arrow functions like `() => {}` + #### ClassDeclaration Whether to check declarations like `class A {}` + #### ClassExpression Whether to check class expressions like `const myClass = class {}` + #### FunctionDeclaration Whether to check function declarations like `function a {}` + #### FunctionExpression Whether to check function expressions like `const a = function {}` + #### MethodDefinition Whether to check method definitions like `class A { someMethodDefinition () {} }` + ### skipInterveningOverloadedDeclarations diff --git a/docs/rules/require-param-description.md b/docs/rules/require-param-description.md index eb48f26c1..b207353cb 100644 --- a/docs/rules/require-param-description.md +++ b/docs/rules/require-param-description.md @@ -42,12 +42,14 @@ expression, i.e., `@callback` or `@function` (or its aliases `@func` or See the ["AST and Selectors"](#user-content-eslint-plugin-jsdoc-advanced-ast-and-selectors) section of our Advanced docs for more on the expected format. + ### defaultDestructuredRootDescription The description string to set by default for destructured roots. Defaults to "The root object". + ### setDefaultDestructuredRootDescription diff --git a/docs/rules/require-param-name.md b/docs/rules/require-param-name.md index b8ce96a9f..b27978c49 100644 --- a/docs/rules/require-param-name.md +++ b/docs/rules/require-param-name.md @@ -41,7 +41,6 @@ See the ["AST and Selectors"](#user-content-eslint-plugin-jsdoc-advanced-ast-and section of our Advanced docs for more on the expected format. - ## Context and settings diff --git a/docs/rules/require-param-type.md b/docs/rules/require-param-type.md index ed7caf11c..8f0b7c502 100644 --- a/docs/rules/require-param-type.md +++ b/docs/rules/require-param-type.md @@ -42,11 +42,13 @@ expression, i.e., `@callback` or `@function` (or its aliases `@func` or See the ["AST and Selectors"](#user-content-eslint-plugin-jsdoc-advanced-ast-and-selectors) section of our Advanced docs for more on the expected format. + ### defaultDestructuredRootType The type string to set by default for destructured roots. Defaults to "object". + ### setDefaultDestructuredRootType diff --git a/docs/rules/require-param.md b/docs/rules/require-param.md index f33bfcd2e..4918198ec 100644 --- a/docs/rules/require-param.md +++ b/docs/rules/require-param.md @@ -243,6 +243,7 @@ A value indicating whether `constructor`s should be checked. Defaults to ### checkDestructured Whether to require destructured properties. Defaults to `true`. + ### checkDestructuredRoots @@ -262,6 +263,7 @@ documentation). Defaults to `true`. ### checkGetters A value indicating whether getters should be checked. Defaults to `false`. + ### checkRestProperty @@ -322,6 +324,7 @@ function quux ({num, ...extra}) { ### checkSetters A value indicating whether setters should be checked. Defaults to `false`. + ### checkTypesPattern @@ -357,6 +360,7 @@ your expression as a string, but like a literal, e.g., `/^object$/vi`. You could set this regular expression to a more expansive list, or you could restrict it such that even types matching those strings would not need destructuring. + ### contexts @@ -379,6 +383,7 @@ section of our Advanced docs for more on the expected format. ### enableFixer Whether to enable the fixer. Defaults to `true`. + ### enableRestElementFixer @@ -447,6 +452,7 @@ function quux ({foo}, {bar}, {baz}) { ``` Has no effect if `enableFixer` is set to `false`. + ### exemptedBy @@ -456,12 +462,14 @@ avoids the need for a `@param`. Defaults to an array with `inheritdoc`. If you set this array, it will overwrite the default, so be sure to add back `inheritdoc` if you wish its presence to cause exemption of the rule. + ### ignoreWhenAllParamsMissing Set to `true` to ignore reporting when all params are missing. Defaults to `false`. + ### interfaceExemptsParamsCheck @@ -472,6 +480,7 @@ Set if you wish TypeScript interfaces to exempt checks for the existence of Will check for a type defining the function itself (on a variable declaration) or if there is a single destructured object with a type. Defaults to `false`. + ### unnamedRootBase @@ -498,6 +507,7 @@ function quux ({foo}, [bar], {baz}) { * @param config1.baz */ ``` + ### useDefaultObjectProperties diff --git a/docs/rules/require-returns-check.md b/docs/rules/require-returns-check.md index 12db7f485..505b23da7 100644 --- a/docs/rules/require-returns-check.md +++ b/docs/rules/require-returns-check.md @@ -41,6 +41,7 @@ non-`undefined` values or `async` functions with explicit `return`'s will be exempted from reporting (i.e., that `async` functions can be reported if they lack an explicit (non-`undefined`) `return` when a `@returns` is present), you can set `exemptAsync` to `false` on the options object. + ### exemptGenerators @@ -52,6 +53,7 @@ leverage `@returns` in generators even without a `return` statement. This option is therefore `true` by default in `typescript` mode (in "jsdoc" mode, one might be more likely to take advantage of `@yields`). Set it to `false` if you wish for a missing `return` to be flagged regardless. + ### reportMissingReturnForUndefinedTypes diff --git a/docs/rules/require-returns.md b/docs/rules/require-returns.md index cf2ebb210..99887c06d 100644 --- a/docs/rules/require-returns.md +++ b/docs/rules/require-returns.md @@ -39,12 +39,14 @@ A single options object has the following properties. A value indicating whether `constructor`s should be checked for `@returns` tags. Defaults to `false`. + ### checkGetters Boolean to determine whether getter methods should be checked for `@returns` tags. Defaults to `true`. + ### contexts @@ -66,12 +68,14 @@ present and the `forceRequireReturn` option is set or if the `forceReturnsWithAsync` option is set with a present `@async` tag (since we are not checking against the actual `return` values in these cases). + ### enableFixer Whether to enable the fixer to add a blank `@returns`. Defaults to `false`. + ### exemptedBy @@ -81,6 +85,7 @@ document block avoids the need for a `@returns`. Defaults to an array with `inheritdoc`. If you set this array, it will overwrite the default, so be sure to add back `inheritdoc` if you wish its presence to cause exemption of the rule. + ### forceRequireReturn @@ -89,6 +94,7 @@ Set to `true` to always insist on `@returns` documentation regardless of implicit or explicit `return`'s in the function. May be desired to flag that a project is aware of an `undefined`/`void` return. Defaults to `false`. + ### forceReturnsWithAsync @@ -101,6 +107,7 @@ detected non-`undefined` `resolve` value) to require `@return` documentation by setting `forceReturnsWithAsync` to `true` on the options object. This may be useful for flagging that there has been consideration of return type. Defaults to `false`. + ### publicOnly @@ -119,7 +126,6 @@ otherwise noted): - `window` - Window global exports are checked for `@returns` JSDoc comments - ## Context and settings diff --git a/docs/rules/require-template.md b/docs/rules/require-template.md index c464ca350..f5c16d92e 100644 --- a/docs/rules/require-template.md +++ b/docs/rules/require-template.md @@ -40,6 +40,7 @@ block avoids the need for a `@template`. Defaults to an array with `inheritdoc`. If you set this array, it will overwrite the default, so be sure to add back `inheritdoc` if you wish its presence to cause exemption of the rule. + ### requireSeparateTemplates @@ -56,7 +57,6 @@ templates of this format: Defaults to `false`. - ||| |---|---| |Context|everywhere| diff --git a/docs/rules/require-throws.md b/docs/rules/require-throws.md index bd943868d..9237d503a 100644 --- a/docs/rules/require-throws.md +++ b/docs/rules/require-throws.md @@ -41,6 +41,7 @@ the rule to apply to any JSDoc block throughout your files (as is necessary for finding function blocks not attached to a function declaration or expression, i.e., `@callback` or `@function` (or its aliases `@func` or `@method`) (including those associated with an `@interface`). + ### exemptedBy diff --git a/docs/rules/require-yields-check.md b/docs/rules/require-yields-check.md index fb1d5686b..8e5713eee 100644 --- a/docs/rules/require-yields-check.md +++ b/docs/rules/require-yields-check.md @@ -41,6 +41,7 @@ that all generators have `@yields`. This can be an optimization with the ESLint `require-yield` rule, as that rule already ensures a `yield` is present in generators, albeit assuming the generator is not empty). Defaults to `false`. + ### contexts @@ -53,6 +54,7 @@ the rule to be applied. Overrides the default contexts (`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`). + ### next diff --git a/docs/rules/require-yields.md b/docs/rules/require-yields.md index fb78e9657..3afc6bced 100644 --- a/docs/rules/require-yields.md +++ b/docs/rules/require-yields.md @@ -49,6 +49,7 @@ present and the `forceRequireYields` option is set or if the `withGeneratorTag` option is set with a present `@generator` tag (since we are not checking against the actual `yield` values in these cases). + ### exemptedBy @@ -58,6 +59,7 @@ document block avoids the need for a `@yields`. Defaults to an array with `inheritdoc`. If you set this array, it will overwrite the default, so be sure to add back `inheritdoc` if you wish its presence to cause exemption of the rule. + ### forceRequireNext @@ -66,6 +68,7 @@ Set to `true` to always insist on `@next` documentation even if there are no `yield` statements in the function or none return values. May be desired to flag that a project is aware of the expected yield return being `undefined`. Defaults to `false`. + ### forceRequireYields @@ -75,6 +78,7 @@ Set to `true` to always insist on expressionless `yield` statements in the function. May be desired to flag that a project is aware of an `undefined`/`void` yield. Defaults to `false`. + ### next @@ -88,6 +92,7 @@ function) to the iterator (e.g., `it.next(value)`). The tag will not be expected if the generator function body merely has plain `yield;` or `yield value;` statements without returning the values. Defaults to `false`. + ### nextWithGeneratorTag @@ -98,6 +103,7 @@ or `undefined` in cases where generators do not use the `next()`-supplied incoming `yield`-returned value. Defaults to `false`. See `contexts` to `any` if you want to catch `@generator` with `@callback` or such not attached to a function. + ### withGeneratorTag diff --git a/docs/rules/sort-tags.md b/docs/rules/sort-tags.md index b052be917..41ecdbdbf 100644 --- a/docs/rules/sort-tags.md +++ b/docs/rules/sort-tags.md @@ -54,6 +54,7 @@ are sorted. If you want all your tags alphabetized, you can supply an empty array for `tagSequence` along with setting this option to `true`. + ### linesBetween @@ -61,6 +62,7 @@ If you want all your tags alphabetized, you can supply an empty array for Indicates the number of lines to be added between tag groups. Defaults to 1. Do not set to 0 or 2+ if you are using `tag-lines` and `"always"` and do not set to 1+ if you are using `tag-lines` and `"never"`. + ### reportIntraTagGroupSpacing @@ -68,6 +70,7 @@ set to 1+ if you are using `tag-lines` and `"never"`. Whether to enable reporting and fixing of line breaks within tags of a given tag group. Defaults to `true` which will remove any line breaks at the end of such tags. Do not use with `true` if you are using `tag-lines` and `always`. + ### reportTagGroupSpacing @@ -76,6 +79,7 @@ Whether to enable reporting and fixing of line breaks between tag groups as set by `linesBetween`. Defaults to `true`. Note that the very last tag will not have spacing applied regardless. For adding line breaks there, you may wish to use the `endLines` option of the `tag-lines` rule. + ### tagSequence diff --git a/docs/rules/tag-lines.md b/docs/rules/tag-lines.md index d80005e9a..a51f98077 100644 --- a/docs/rules/tag-lines.md +++ b/docs/rules/tag-lines.md @@ -51,6 +51,7 @@ Set to `false` and use with "always" to indicate the normal lines to be added after tags should not be added after the final tag. Defaults to `true`. + ### count @@ -58,6 +59,7 @@ Defaults to `true`. Use with "always" to indicate the number of lines to require be present. Defaults to 1. + ### endLines @@ -66,6 +68,7 @@ If not set to `null`, will enforce end lines to the given count on the final tag only. Defaults to `0`. + ### maxBlockLines @@ -75,6 +78,7 @@ If not set to `null`, will enforce a maximum number of lines to the given count Note that if non-`null`, `maxBlockLines` must be greater than or equal to `startLines`. Defaults to `null`. + ### startLines @@ -84,6 +88,7 @@ first tag only, unless there is only whitespace content, in which case, a line count will not be enforced. Defaults to `0`. + ### tags diff --git a/docs/rules/text-escaping.md b/docs/rules/text-escaping.md index 9dae10f1b..9fad7a381 100644 --- a/docs/rules/text-escaping.md +++ b/docs/rules/text-escaping.md @@ -41,6 +41,7 @@ A single options object has the following properties. This option escapes all `<` and `&` characters (except those followed by whitespace which are treated as literals by Visual Studio Code). Defaults to `false`. + ### escapeMarkdown diff --git a/docs/rules/type-formatting.md b/docs/rules/type-formatting.md index 348484b71..14acfb40c 100644 --- a/docs/rules/type-formatting.md +++ b/docs/rules/type-formatting.md @@ -21,22 +21,26 @@ A single options object has the following properties. ### arrayBrackets Determines how array generics are represented. Set to `angle` for the style `Array` or `square` for the style `type[]`. Defaults to "square". + ### enableFixer Whether to enable the fixer. Defaults to `true`. + ### genericDot Boolean value of whether to use a dot before the angled brackets of a generic (e.g., `SomeType.`). Defaults to `false`. + ### objectFieldIndent A string indicating the whitespace to be added on each line preceding an object property-value field. Defaults to the empty string. + ### objectFieldQuote @@ -45,6 +49,7 @@ Whether and how object field properties should be quoted (e.g., `{"a": string}`) Set to `single`, `double`, or `null`. Defaults to `null` (no quotes unless required due to special characters within the field). Digits will be kept as is, regardless of setting (they can either represent a digit or a string digit). + ### objectFieldSeparator @@ -54,6 +59,7 @@ For object properties, specify whether a "semicolon", "comma", "linebreak", each object property-value pair. Defaults to `"comma"`. + ### objectFieldSeparatorOptionalLinebreak @@ -62,6 +68,7 @@ Whether `objectFieldSeparator` set to `"semicolon-and-linebreak"` or `"comma-and-linebreak"` should be allowed to optionally drop the linebreak. Defaults to `true`. + ### objectFieldSeparatorTrailingPunctuation @@ -71,18 +78,21 @@ or there are multiple property-value object fields present), this property will determine whether to add punctuation corresponding to the `objectFieldSeparator` (e.g., a semicolon) to the final object field. Defaults to `false`. + ### separatorForSingleObjectField Whether to apply the `objectFieldSeparator` (e.g., a semicolon) when there is only one property-value object field present. Defaults to `false`. + ### stringQuotes How string literals should be quoted (e.g., `"abc"`). Set to `single` or `double`. Defaults to 'single'. + ### typeBracketSpacing @@ -90,6 +100,7 @@ or `double`. Defaults to 'single'. A string of spaces that will be added immediately after the type's initial curly bracket and immediately before its ending curly bracket. Defaults to the empty string. + ### unionSpacing diff --git a/package.json b/package.json index 0731671cb..e398ab33e 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "url": "http://gajus.com" }, "dependencies": { - "@es-joy/jsdoccomment": "~0.62.0", + "@es-joy/jsdoccomment": "~0.64.0", "are-docs-informative": "^0.0.2", "comment-parser": "1.4.1", "debug": "^4.4.3", @@ -41,10 +41,10 @@ "@types/estree": "^1.0.8", "@types/json-schema": "^7.0.15", "@types/mocha": "^10.0.10", - "@types/node": "^24.5.2", + "@types/node": "^24.6.0", "@types/semver": "^7.7.1", "@types/spdx-expression-parse": "^3.0.5", - "@typescript-eslint/types": "^8.44.1", + "@typescript-eslint/types": "^8.45.0", "babel-plugin-add-module-exports": "^1.0.4", "babel-plugin-istanbul": "^7.0.1", "babel-plugin-transform-import-meta": "^2.3.3", @@ -58,17 +58,17 @@ "glob": "^11.0.3", "globals": "^16.4.0", "husky": "^9.1.7", - "jsdoc-type-pratt-parser": "^5.9.2", + "jsdoc-type-pratt-parser": "^6.0.1", "json-schema": "^0.4.0", "json-schema-to-typescript": "^15.0.4", - "lint-staged": "^16.2.1", - "mocha": "^11.7.2", + "lint-staged": "^16.2.3", + "mocha": "^11.7.3", "open-editor": "^5.1.0", "replace": "^1.2.2", "rimraf": "^6.0.1", "semantic-release": "^24.2.9", "typescript": "5.9.2", - "typescript-eslint": "^8.44.1" + "typescript-eslint": "^8.45.0" }, "engines": { "node": ">=20.11.0" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d16476fcc..3c6f6d223 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,8 +12,8 @@ importers: .: dependencies: '@es-joy/jsdoccomment': - specifier: ~0.62.0 - version: 0.62.0 + specifier: ~0.64.0 + version: 0.64.0 are-docs-informative: specifier: ^0.0.2 version: 0.0.2 @@ -112,8 +112,8 @@ importers: specifier: ^10.0.10 version: 10.0.10 '@types/node': - specifier: ^24.5.2 - version: 24.5.2 + specifier: ^24.6.0 + version: 24.6.0 '@types/semver': specifier: ^7.7.1 version: 7.7.1 @@ -121,8 +121,8 @@ importers: specifier: ^3.0.5 version: 3.0.5 '@typescript-eslint/types': - specifier: ^8.44.1 - version: 8.44.1 + specifier: ^8.45.0 + version: 8.45.0 babel-plugin-add-module-exports: specifier: ^1.0.4 version: 1.0.4 @@ -149,7 +149,7 @@ importers: version: 9.36.0(jiti@2.6.0) eslint-config-canonical: specifier: ^45.0.0 - version: 45.0.0(@types/node@24.5.2)(@typescript-eslint/utils@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)))(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2) + version: 45.0.0(@types/node@24.6.0)(@typescript-eslint/utils@8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)))(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2) gitdown: specifier: ^4.1.1 version: 4.1.1(re2@1.20.9) @@ -163,8 +163,8 @@ importers: specifier: ^9.1.7 version: 9.1.7 jsdoc-type-pratt-parser: - specifier: ^5.9.2 - version: 5.9.2 + specifier: ^6.0.1 + version: 6.0.1 json-schema: specifier: ^0.4.0 version: 0.4.0 @@ -172,11 +172,11 @@ importers: specifier: ^15.0.4 version: 15.0.4 lint-staged: - specifier: ^16.2.1 - version: 16.2.1 + specifier: ^16.2.3 + version: 16.2.3 mocha: - specifier: ^11.7.2 - version: 11.7.2 + specifier: ^11.7.3 + version: 11.7.3 open-editor: specifier: ^5.1.0 version: 5.1.0 @@ -193,8 +193,8 @@ importers: specifier: 5.9.2 version: 5.9.2 typescript-eslint: - specifier: ^8.44.1 - version: 8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2) + specifier: ^8.45.0 + version: 8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2) packages: @@ -789,6 +789,10 @@ packages: resolution: {integrity: sha512-yWi6sm7INEwnfS7IJvE0dU+RTrwzLPFcY7e7eGpu/l5Q9lWfQ2ROwZ0qVnc242jw2TUPsfHX3XMIISkGBv57RQ==} engines: {node: '>=20.11.0'} + '@es-joy/jsdoccomment@0.64.0': + resolution: {integrity: sha512-sLUv/udfqNO795T0dHAgV6kC79VJvUfX3kDw/F24+dVvGL25QQfxWLTrNjIZ3BcD8R/c8Hg3inC0GrXXTSw4/A==} + engines: {node: '>=20.11.0'} + '@eslint-community/eslint-utils@4.9.0': resolution: {integrity: sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1234,8 +1238,8 @@ packages: '@types/ms@2.1.0': resolution: {integrity: sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==} - '@types/node@24.5.2': - resolution: {integrity: sha512-FYxk1I7wPv3K2XBaoyH2cTnocQEu8AOZ60hPbsyukMPLv5/5qr7V1i8PLHdl6Zf87I+xZXFvPCXYjiTFq+YSDQ==} + '@types/node@24.6.0': + resolution: {integrity: sha512-F1CBxgqwOMc4GKJ7eY22hWhBVQuMYTtqI8L0FcszYcpYX0fzfDGpez22Xau8Mgm7O9fI+zA/TYIdq3tGWfweBA==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -1257,6 +1261,14 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <6.0.0' + '@typescript-eslint/eslint-plugin@8.45.0': + resolution: {integrity: sha512-HC3y9CVuevvWCl/oyZuI47dOeDF9ztdMEfMH8/DW/Mhwa9cCLnK1oD7JoTVGW/u7kFzNZUKUoyJEqkaJh5y3Wg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + '@typescript-eslint/parser': ^8.45.0 + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + '@typescript-eslint/parser@8.44.1': resolution: {integrity: sha512-EHrrEsyhOhxYt8MTg4zTF+DJMuNBzWwgvvOYNj/zm1vnaD/IC5zCXFehZv94Piqa2cRFfXrTFxIvO95L7Qc/cw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1264,22 +1276,45 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <6.0.0' + '@typescript-eslint/parser@8.45.0': + resolution: {integrity: sha512-TGf22kon8KW+DeKaUmOibKWktRY8b2NSAZNdtWh798COm1NWx8+xJ6iFBtk3IvLdv6+LGLJLRlyhrhEDZWargQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + '@typescript-eslint/project-service@8.44.1': resolution: {integrity: sha512-ycSa60eGg8GWAkVsKV4E6Nz33h+HjTXbsDT4FILyL8Obk5/mx4tbvCNsLf9zret3ipSumAOG89UcCs/KRaKYrA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.0.0' + '@typescript-eslint/project-service@8.45.0': + resolution: {integrity: sha512-3pcVHwMG/iA8afdGLMuTibGR7pDsn9RjDev6CCB+naRsSYs2pns5QbinF4Xqw6YC/Sj3lMrm/Im0eMfaa61WUg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.0.0' + '@typescript-eslint/scope-manager@8.44.1': resolution: {integrity: sha512-NdhWHgmynpSvyhchGLXh+w12OMT308Gm25JoRIyTZqEbApiBiQHD/8xgb6LqCWCFcxFtWwaVdFsLPQI3jvhywg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/scope-manager@8.45.0': + resolution: {integrity: sha512-clmm8XSNj/1dGvJeO6VGH7EUSeA0FMs+5au/u3lrA3KfG8iJ4u8ym9/j2tTEoacAffdW1TVUzXO30W1JTJS7dA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/tsconfig-utils@8.44.1': resolution: {integrity: sha512-B5OyACouEjuIvof3o86lRMvyDsFwZm+4fBOqFHccIctYgBjqR3qT39FBYGN87khcgf0ExpdCBeGKpKRhSFTjKQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.0.0' + '@typescript-eslint/tsconfig-utils@8.45.0': + resolution: {integrity: sha512-aFdr+c37sc+jqNMGhH+ajxPXwjv9UtFZk79k8pLoJ6p4y0snmYpPA52GuWHgt2ZF4gRRW6odsEj41uZLojDt5w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.0.0' + '@typescript-eslint/type-utils@8.44.1': resolution: {integrity: sha512-KdEerZqHWXsRNKjF9NYswNISnFzXfXNDfPxoTh7tqohU/PRIbwTmsjGK6V9/RTYWau7NZvfo52lgVk+sJh0K3g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1287,16 +1322,33 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <6.0.0' + '@typescript-eslint/type-utils@8.45.0': + resolution: {integrity: sha512-bpjepLlHceKgyMEPglAeULX1vixJDgaKocp0RVJ5u4wLJIMNuKtUXIczpJCPcn2waII0yuvks/5m5/h3ZQKs0A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + '@typescript-eslint/types@8.44.1': resolution: {integrity: sha512-Lk7uj7y9uQUOEguiDIDLYLJOrYHQa7oBiURYVFqIpGxclAFQ78f6VUOM8lI2XEuNOKNB7XuvM2+2cMXAoq4ALQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/types@8.45.0': + resolution: {integrity: sha512-WugXLuOIq67BMgQInIxxnsSyRLFxdkJEJu8r4ngLR56q/4Q5LrbfkFRH27vMTjxEK8Pyz7QfzuZe/G15qQnVRA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/typescript-estree@8.44.1': resolution: {integrity: sha512-qnQJ+mVa7szevdEyvfItbO5Vo+GfZ4/GZWWDRRLjrxYPkhM+6zYB2vRYwCsoJLzqFCdZT4mEqyJoyzkunsZ96A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.0.0' + '@typescript-eslint/typescript-estree@8.45.0': + resolution: {integrity: sha512-GfE1NfVbLam6XQ0LcERKwdTTPlLvHvXXhOeUGC1OXi4eQBoyy1iVsW+uzJ/J9jtCz6/7GCQ9MtrQ0fml/jWCnA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.0.0' + '@typescript-eslint/utils@8.44.1': resolution: {integrity: sha512-DpX5Fp6edTlocMCwA+mHY8Mra+pPjRZ0TfHkXI8QFelIKcbADQz1LUPNtzOFUriBB2UYqw4Pi9+xV4w9ZczHFg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1304,10 +1356,21 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <6.0.0' + '@typescript-eslint/utils@8.45.0': + resolution: {integrity: sha512-bxi1ht+tLYg4+XV2knz/F7RVhU0k6VrSMc9sb8DQ6fyCTrGQLHfo7lDtN0QJjZjKkLA2ThrKuCdHEvLReqtIGg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + '@typescript-eslint/visitor-keys@8.44.1': resolution: {integrity: sha512-576+u0QD+Jp3tZzvfRfxon0EA2lzcDt3lhUbsC6Lgzy9x2VR4E+JUiNyGHi5T8vk0TV+fpJ5GLG1JsJuWCaKhw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/visitor-keys@8.45.0': + resolution: {integrity: sha512-qsaFBA3e09MIDAGFUrTk+dzqtfv1XPVz8t8d1f0ybTzrCY7BKiMC5cjrl1O/P7UmHsNyW90EYSkU/ZWpmXelag==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@unrs/resolver-binding-android-arm-eabi@1.11.1': resolution: {integrity: sha512-ppLRUgHVaGRWUx0R0Ut06Mjo9gBaBkg3v/8AxusGLhsIotbBLuRk51rAzqLC8gq6NyyAojEXglNjzf6R948DNw==} cpu: [arm] @@ -3344,6 +3407,10 @@ packages: resolution: {integrity: sha512-TYzkACp/wPvDJLRY7qpHXtrhgwoAaojIOnLaaVNi+AbPU2u1kkjfKd9hXXTq0qSAGsyYXvwUXt99h9I5iCmjjw==} engines: {node: '>=12.0.0'} + jsdoc-type-pratt-parser@6.0.1: + resolution: {integrity: sha512-N2OCUHYmrEPSH3SDKvbri9gAsOvhyJ01142dRb2gnpOGjBqGkUI5r6EcFSVXtLPUoUFTuh/TYMHTIEGpobqT5w==} + engines: {node: '>=20.0.0'} + jsdom@6.5.1: resolution: {integrity: sha512-KeCN3yqR+MmjAZDnVZgIaL2tP9BxSFlsYZw9Z+zy64+jJzHc1m8ruccb83Qe8AG0xKUjpo2kxEGFCMtiF4MmAg==} @@ -3428,8 +3495,8 @@ packages: lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} - lint-staged@16.2.1: - resolution: {integrity: sha512-KMeYmH9wKvHsXdUp+z6w7HN3fHKHXwT1pSTQTYxB9kI6ekK1rlL3kLZEoXZCppRPXFK9PFW/wfQctV7XUqMrPQ==} + lint-staged@16.2.3: + resolution: {integrity: sha512-1OnJEESB9zZqsp61XHH2fvpS1es3hRCxMplF/AJUDa8Ho8VrscYDIuxGrj3m8KPXbcWZ8fT9XTMUhEQmOVKpKw==} engines: {node: '>=20.17'} hasBin: true @@ -3672,8 +3739,8 @@ packages: engines: {node: '>=10'} hasBin: true - mocha@11.7.2: - resolution: {integrity: sha512-lkqVJPmqqG/w5jmmFtiRvtA2jkDyNVUcefFJKb2uyX4dekk8Okgqop3cgbFiaIvj8uCRJVTP5x9dfxGyXm2jvQ==} + mocha@11.7.3: + resolution: {integrity: sha512-iorDKDzBKgVk/npVkW2S+b57ekA9+xKWijVvNpgPMl1odxeB4HavgiydLN54Lhyn/jpcM+Z/BohCzIvHmfaPCw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true @@ -4780,8 +4847,8 @@ packages: resolution: {integrity: sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==} engines: {node: '>= 0.4'} - typescript-eslint@8.44.1: - resolution: {integrity: sha512-0ws8uWGrUVTjEeN2OM4K1pLKHK/4NiNP/vz6ns+LjT/6sqpaYzIVFajZb1fj/IDwpsrrHb3Jy0Qm5u9CPcKaeg==} + typescript-eslint@8.45.0: + resolution: {integrity: sha512-qzDmZw/Z5beNLUrXfd0HIW6MzIaAV5WNDxmMs9/3ojGOpYavofgNAAD/nC6tGV2PczIi0iw8vot2eAe/sBn7zg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -4806,8 +4873,8 @@ packages: resolution: {integrity: sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==} engines: {node: '>= 0.4'} - undici-types@7.12.0: - resolution: {integrity: sha512-goOacqME2GYyOZZfb5Lgtu+1IDmAlAEu5xnD3+xTzS10hT0vzpf0SPjkXwAw9Jm+4n/mQGDP3LO8CPbYROeBfQ==} + undici-types@7.13.0: + resolution: {integrity: sha512-Ov2Rr9Sx+fRgagJ5AX0qvItZG/JKKoBRAVITs1zk7IqZGTJUwgUr7qoYBpWwakpWilTZFM98rG/AFRocu10iIQ==} unicode-canonical-property-names-ecmascript@2.0.1: resolution: {integrity: sha512-dA8WbNeb2a6oQzAQ55YlT5vQAWGV9WXOsi3SskE3bcCdM0P4SDd+24zS/OCacdRq5BkdsRj9q3Pg6YyQoxIGqg==} @@ -5860,7 +5927,7 @@ snapshots: '@es-joy/jsdoccomment@0.50.2': dependencies: '@types/estree': 1.0.8 - '@typescript-eslint/types': 8.44.1 + '@typescript-eslint/types': 8.45.0 comment-parser: 1.4.1 esquery: 1.6.0 jsdoc-type-pratt-parser: 4.1.0 @@ -5868,11 +5935,19 @@ snapshots: '@es-joy/jsdoccomment@0.62.0': dependencies: '@types/estree': 1.0.8 - '@typescript-eslint/types': 8.44.1 + '@typescript-eslint/types': 8.45.0 comment-parser: 1.4.1 esquery: 1.6.0 jsdoc-type-pratt-parser: 5.9.2 + '@es-joy/jsdoccomment@0.64.0': + dependencies: + '@types/estree': 1.0.8 + '@typescript-eslint/types': 8.45.0 + comment-parser: 1.4.1 + esquery: 1.6.0 + jsdoc-type-pratt-parser: 6.0.1 + '@eslint-community/eslint-utils@4.9.0(eslint@9.36.0(jiti@2.6.0))': dependencies: eslint: 9.36.0(jiti@2.6.0) @@ -5923,7 +5998,7 @@ snapshots: '@fastify/busboy@3.2.0': {} - '@graphql-eslint/eslint-plugin@4.4.0(@types/node@24.5.2)(eslint@9.36.0(jiti@2.6.0))(graphql@16.11.0)(typescript@5.9.2)': + '@graphql-eslint/eslint-plugin@4.4.0(@types/node@24.6.0)(eslint@9.36.0(jiti@2.6.0))(graphql@16.11.0)(typescript@5.9.2)': dependencies: '@graphql-tools/code-file-loader': 8.1.22(graphql@16.11.0) '@graphql-tools/graphql-tag-pluck': 8.3.21(graphql@16.11.0) @@ -5932,7 +6007,7 @@ snapshots: eslint: 9.36.0(jiti@2.6.0) fast-glob: 3.3.3 graphql: 16.11.0 - graphql-config: 5.1.5(@types/node@24.5.2)(graphql@16.11.0)(typescript@5.9.2) + graphql-config: 5.1.5(@types/node@24.6.0)(graphql@16.11.0)(typescript@5.9.2) graphql-depth-limit: 1.1.0(graphql@16.11.0) lodash.lowercase: 4.3.0 transitivePeerDependencies: @@ -6009,7 +6084,7 @@ snapshots: - uWebSockets.js - utf-8-validate - '@graphql-tools/executor-http@1.3.3(@types/node@24.5.2)(graphql@16.11.0)': + '@graphql-tools/executor-http@1.3.3(@types/node@24.6.0)(graphql@16.11.0)': dependencies: '@graphql-hive/signal': 1.0.0 '@graphql-tools/executor-common': 0.0.4(graphql@16.11.0) @@ -6019,7 +6094,7 @@ snapshots: '@whatwg-node/fetch': 0.10.11 '@whatwg-node/promise-helpers': 1.3.2 graphql: 16.11.0 - meros: 1.3.2(@types/node@24.5.2) + meros: 1.3.2(@types/node@24.6.0) tslib: 2.8.1 transitivePeerDependencies: - '@types/node' @@ -6109,10 +6184,10 @@ snapshots: graphql: 16.11.0 tslib: 2.8.1 - '@graphql-tools/url-loader@8.0.33(@types/node@24.5.2)(graphql@16.11.0)': + '@graphql-tools/url-loader@8.0.33(@types/node@24.6.0)(graphql@16.11.0)': dependencies: '@graphql-tools/executor-graphql-ws': 2.0.7(graphql@16.11.0) - '@graphql-tools/executor-http': 1.3.3(@types/node@24.5.2)(graphql@16.11.0) + '@graphql-tools/executor-http': 1.3.3(@types/node@24.6.0)(graphql@16.11.0) '@graphql-tools/executor-legacy-ws': 1.1.19(graphql@16.11.0) '@graphql-tools/utils': 10.9.1(graphql@16.11.0) '@graphql-tools/wrap': 10.1.4(graphql@16.11.0) @@ -6492,9 +6567,9 @@ snapshots: '@types/ms@2.1.0': {} - '@types/node@24.5.2': + '@types/node@24.6.0': dependencies: - undici-types: 7.12.0 + undici-types: 7.13.0 '@types/normalize-package-data@2.4.4': {} @@ -6504,7 +6579,7 @@ snapshots: '@types/ws@8.18.1': dependencies: - '@types/node': 24.5.2 + '@types/node': 24.6.0 '@typescript-eslint/eslint-plugin@8.44.1(@typescript-eslint/parser@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2)': dependencies: @@ -6523,6 +6598,23 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/eslint-plugin@8.45.0(@typescript-eslint/parser@8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2)': + dependencies: + '@eslint-community/regexpp': 4.12.1 + '@typescript-eslint/parser': 8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2) + '@typescript-eslint/scope-manager': 8.45.0 + '@typescript-eslint/type-utils': 8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2) + '@typescript-eslint/utils': 8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2) + '@typescript-eslint/visitor-keys': 8.45.0 + eslint: 9.36.0(jiti@2.6.0) + graphemer: 1.4.0 + ignore: 7.0.5 + natural-compare: 1.4.0 + ts-api-utils: 2.1.0(typescript@5.9.2) + typescript: 5.9.2 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/parser@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2)': dependencies: '@typescript-eslint/scope-manager': 8.44.1 @@ -6535,10 +6627,31 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/parser@8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2)': + dependencies: + '@typescript-eslint/scope-manager': 8.45.0 + '@typescript-eslint/types': 8.45.0 + '@typescript-eslint/typescript-estree': 8.45.0(typescript@5.9.2) + '@typescript-eslint/visitor-keys': 8.45.0 + debug: 4.4.3(supports-color@8.1.1) + eslint: 9.36.0(jiti@2.6.0) + typescript: 5.9.2 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/project-service@8.44.1(typescript@5.9.2)': dependencies: '@typescript-eslint/tsconfig-utils': 8.44.1(typescript@5.9.2) - '@typescript-eslint/types': 8.44.1 + '@typescript-eslint/types': 8.45.0 + debug: 4.4.3(supports-color@8.1.1) + typescript: 5.9.2 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/project-service@8.45.0(typescript@5.9.2)': + dependencies: + '@typescript-eslint/tsconfig-utils': 8.45.0(typescript@5.9.2) + '@typescript-eslint/types': 8.45.0 debug: 4.4.3(supports-color@8.1.1) typescript: 5.9.2 transitivePeerDependencies: @@ -6549,10 +6662,19 @@ snapshots: '@typescript-eslint/types': 8.44.1 '@typescript-eslint/visitor-keys': 8.44.1 + '@typescript-eslint/scope-manager@8.45.0': + dependencies: + '@typescript-eslint/types': 8.45.0 + '@typescript-eslint/visitor-keys': 8.45.0 + '@typescript-eslint/tsconfig-utils@8.44.1(typescript@5.9.2)': dependencies: typescript: 5.9.2 + '@typescript-eslint/tsconfig-utils@8.45.0(typescript@5.9.2)': + dependencies: + typescript: 5.9.2 + '@typescript-eslint/type-utils@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2)': dependencies: '@typescript-eslint/types': 8.44.1 @@ -6565,8 +6687,22 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/type-utils@8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2)': + dependencies: + '@typescript-eslint/types': 8.45.0 + '@typescript-eslint/typescript-estree': 8.45.0(typescript@5.9.2) + '@typescript-eslint/utils': 8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2) + debug: 4.4.3(supports-color@8.1.1) + eslint: 9.36.0(jiti@2.6.0) + ts-api-utils: 2.1.0(typescript@5.9.2) + typescript: 5.9.2 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/types@8.44.1': {} + '@typescript-eslint/types@8.45.0': {} + '@typescript-eslint/typescript-estree@8.44.1(typescript@5.9.2)': dependencies: '@typescript-eslint/project-service': 8.44.1(typescript@5.9.2) @@ -6583,6 +6719,22 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/typescript-estree@8.45.0(typescript@5.9.2)': + dependencies: + '@typescript-eslint/project-service': 8.45.0(typescript@5.9.2) + '@typescript-eslint/tsconfig-utils': 8.45.0(typescript@5.9.2) + '@typescript-eslint/types': 8.45.0 + '@typescript-eslint/visitor-keys': 8.45.0 + debug: 4.4.3(supports-color@8.1.1) + fast-glob: 3.3.3 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.7.2 + ts-api-utils: 2.1.0(typescript@5.9.2) + typescript: 5.9.2 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/utils@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2)': dependencies: '@eslint-community/eslint-utils': 4.9.0(eslint@9.36.0(jiti@2.6.0)) @@ -6594,11 +6746,27 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/utils@8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2)': + dependencies: + '@eslint-community/eslint-utils': 4.9.0(eslint@9.36.0(jiti@2.6.0)) + '@typescript-eslint/scope-manager': 8.45.0 + '@typescript-eslint/types': 8.45.0 + '@typescript-eslint/typescript-estree': 8.45.0(typescript@5.9.2) + eslint: 9.36.0(jiti@2.6.0) + typescript: 5.9.2 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/visitor-keys@8.44.1': dependencies: '@typescript-eslint/types': 8.44.1 eslint-visitor-keys: 4.2.1 + '@typescript-eslint/visitor-keys@8.45.0': + dependencies: + '@typescript-eslint/types': 8.45.0 + eslint-visitor-keys: 4.2.1 + '@unrs/resolver-binding-android-arm-eabi@1.11.1': optional: true @@ -7546,9 +7714,9 @@ snapshots: eslint: 9.36.0(jiti@2.6.0) semver: 7.7.2 - eslint-config-canonical@45.0.0(@types/node@24.5.2)(@typescript-eslint/utils@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)))(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2): + eslint-config-canonical@45.0.0(@types/node@24.6.0)(@typescript-eslint/utils@8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)))(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2): dependencies: - '@graphql-eslint/eslint-plugin': 4.4.0(@types/node@24.5.2)(eslint@9.36.0(jiti@2.6.0))(graphql@16.11.0)(typescript@5.9.2) + '@graphql-eslint/eslint-plugin': 4.4.0(@types/node@24.6.0)(eslint@9.36.0(jiti@2.6.0))(graphql@16.11.0)(typescript@5.9.2) '@next/eslint-plugin-next': 15.5.4 '@stylistic/eslint-plugin': 4.4.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2) '@typescript-eslint/eslint-plugin': 8.44.1(@typescript-eslint/parser@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2) @@ -7556,14 +7724,14 @@ snapshots: '@vitest/eslint-plugin': 1.3.13(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2) eslint: 9.36.0(jiti@2.6.0) eslint-config-prettier: 10.1.8(eslint@9.36.0(jiti@2.6.0)) - eslint-import-resolver-typescript: 4.4.4(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)))(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)))(eslint@9.36.0(jiti@2.6.0)) + eslint-import-resolver-typescript: 4.4.4(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)))(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)))(eslint@9.36.0(jiti@2.6.0)) eslint-plugin-ava: 15.1.0(eslint@9.36.0(jiti@2.6.0)) - eslint-plugin-canonical: 5.1.3(@typescript-eslint/parser@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)))(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)))(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2) + eslint-plugin-canonical: 5.1.3(@typescript-eslint/parser@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)))(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)))(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2) eslint-plugin-eslint-comments: 3.2.0(eslint@9.36.0(jiti@2.6.0)) eslint-plugin-fp: 2.3.0(eslint@9.36.0(jiti@2.6.0)) eslint-plugin-functional: 9.0.2(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2) - eslint-plugin-import: eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)) - eslint-plugin-jest: 28.14.0(@typescript-eslint/eslint-plugin@8.44.1(@typescript-eslint/parser@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2) + eslint-plugin-import: eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)) + eslint-plugin-jest: 28.14.0(@typescript-eslint/eslint-plugin@8.44.1(@typescript-eslint/parser@8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2) eslint-plugin-jsdoc: 50.8.0(eslint@9.36.0(jiti@2.6.0)) eslint-plugin-jsonc: 2.20.1(eslint@9.36.0(jiti@2.6.0)) eslint-plugin-jsx-a11y: 6.10.2(eslint@9.36.0(jiti@2.6.0)) @@ -7584,7 +7752,7 @@ snapshots: graphql: 16.11.0 prettier: 3.6.2 ramda: 0.30.1 - typescript-eslint: 8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2) + typescript-eslint: 8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2) yaml-eslint-parser: 1.3.0 transitivePeerDependencies: - '@apollo/subgraph' @@ -7618,7 +7786,7 @@ snapshots: optionalDependencies: unrs-resolver: 1.11.1 - eslint-import-resolver-typescript@3.10.1(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)))(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)))(eslint@9.36.0(jiti@2.6.0)): + eslint-import-resolver-typescript@3.10.1(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)))(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)))(eslint@9.36.0(jiti@2.6.0)): dependencies: '@nolyfill/is-core-module': 1.0.39 debug: 4.4.3(supports-color@8.1.1) @@ -7629,12 +7797,12 @@ snapshots: tinyglobby: 0.2.15 unrs-resolver: 1.11.1 optionalDependencies: - eslint-plugin-import: eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)) - eslint-plugin-import-x: 4.16.1(@typescript-eslint/utils@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)) + eslint-plugin-import: eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)) + eslint-plugin-import-x: 4.16.1(@typescript-eslint/utils@8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)) transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@4.4.4(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)))(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)))(eslint@9.36.0(jiti@2.6.0)): + eslint-import-resolver-typescript@4.4.4(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)))(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)))(eslint@9.36.0(jiti@2.6.0)): dependencies: debug: 4.4.3(supports-color@8.1.1) eslint: 9.36.0(jiti@2.6.0) @@ -7645,8 +7813,8 @@ snapshots: tinyglobby: 0.2.15 unrs-resolver: 1.11.1 optionalDependencies: - eslint-plugin-import: eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)) - eslint-plugin-import-x: 4.16.1(@typescript-eslint/utils@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)) + eslint-plugin-import: eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)) + eslint-plugin-import-x: 4.16.1(@typescript-eslint/utils@8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)) transitivePeerDependencies: - supports-color @@ -7656,13 +7824,13 @@ snapshots: esquery: 1.6.0 jsonc-eslint-parser: 2.4.1 - eslint-module-utils@2.12.1(@typescript-eslint/parser@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)))(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)))(eslint@9.36.0(jiti@2.6.0)))(eslint@9.36.0(jiti@2.6.0)): + eslint-module-utils@2.12.1(@typescript-eslint/parser@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)))(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)))(eslint@9.36.0(jiti@2.6.0)))(eslint@9.36.0(jiti@2.6.0)): dependencies: debug: 3.2.7 optionalDependencies: '@typescript-eslint/parser': 8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2) eslint: 9.36.0(jiti@2.6.0) - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)))(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)))(eslint@9.36.0(jiti@2.6.0)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)))(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)))(eslint@9.36.0(jiti@2.6.0)) transitivePeerDependencies: - supports-color @@ -7678,14 +7846,14 @@ snapshots: pkg-dir: 5.0.0 resolve-from: 5.0.0 - eslint-plugin-canonical@5.1.3(@typescript-eslint/parser@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)))(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)))(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2): + eslint-plugin-canonical@5.1.3(@typescript-eslint/parser@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)))(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)))(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2): dependencies: '@typescript-eslint/utils': 8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2) array-includes: 3.1.9 debug: 4.4.3(supports-color@8.1.1) doctrine: 3.0.0 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)))(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)))(eslint@9.36.0(jiti@2.6.0)) - eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)))(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)))(eslint@9.36.0(jiti@2.6.0)))(eslint@9.36.0(jiti@2.6.0)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)))(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)))(eslint@9.36.0(jiti@2.6.0)) + eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)))(eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)))(eslint@9.36.0(jiti@2.6.0)))(eslint@9.36.0(jiti@2.6.0)) is-get-set-prop: 1.0.0 is-js-type: 2.0.0 is-obj-prop: 1.0.0 @@ -7740,9 +7908,9 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)): + eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0)): dependencies: - '@typescript-eslint/types': 8.44.1 + '@typescript-eslint/types': 8.45.0 comment-parser: 1.4.1 debug: 4.4.3(supports-color@8.1.1) eslint: 9.36.0(jiti@2.6.0) @@ -7753,11 +7921,11 @@ snapshots: stable-hash-x: 0.2.0 unrs-resolver: 1.11.1 optionalDependencies: - '@typescript-eslint/utils': 8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2) + '@typescript-eslint/utils': 8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2) transitivePeerDependencies: - supports-color - eslint-plugin-jest@28.14.0(@typescript-eslint/eslint-plugin@8.44.1(@typescript-eslint/parser@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2): + eslint-plugin-jest@28.14.0(@typescript-eslint/eslint-plugin@8.44.1(@typescript-eslint/parser@8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2): dependencies: '@typescript-eslint/utils': 8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2) eslint: 9.36.0(jiti@2.6.0) @@ -7849,7 +8017,7 @@ snapshots: eslint-plugin-perfectionist@4.15.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2): dependencies: - '@typescript-eslint/types': 8.44.1 + '@typescript-eslint/types': 8.45.0 '@typescript-eslint/utils': 8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2) eslint: 9.36.0(jiti@2.6.0) natural-orderby: 5.0.0 @@ -8393,13 +8561,13 @@ snapshots: graphemer@1.4.0: {} - graphql-config@5.1.5(@types/node@24.5.2)(graphql@16.11.0)(typescript@5.9.2): + graphql-config@5.1.5(@types/node@24.6.0)(graphql@16.11.0)(typescript@5.9.2): dependencies: '@graphql-tools/graphql-file-loader': 8.1.2(graphql@16.11.0) '@graphql-tools/json-file-loader': 8.0.20(graphql@16.11.0) '@graphql-tools/load': 8.1.2(graphql@16.11.0) '@graphql-tools/merge': 9.1.1(graphql@16.11.0) - '@graphql-tools/url-loader': 8.0.33(@types/node@24.5.2)(graphql@16.11.0) + '@graphql-tools/url-loader': 8.0.33(@types/node@24.6.0)(graphql@16.11.0) '@graphql-tools/utils': 10.9.1(graphql@16.11.0) cosmiconfig: 8.3.6(typescript@5.9.2) graphql: 16.11.0 @@ -8868,6 +9036,8 @@ snapshots: jsdoc-type-pratt-parser@5.9.2: {} + jsdoc-type-pratt-parser@6.0.1: {} + jsdom@6.5.1: dependencies: acorn: 2.7.0 @@ -8972,7 +9142,7 @@ snapshots: lines-and-columns@1.2.4: {} - lint-staged@16.2.1: + lint-staged@16.2.3: dependencies: commander: 14.0.1 listr2: 9.0.4 @@ -9145,9 +9315,9 @@ snapshots: merge2@1.4.1: {} - meros@1.3.2(@types/node@24.5.2): + meros@1.3.2(@types/node@24.6.0): optionalDependencies: - '@types/node': 24.5.2 + '@types/node': 24.6.0 micro-spelling-correcter@1.1.1: {} @@ -9234,7 +9404,7 @@ snapshots: mkdirp@1.0.4: optional: true - mocha@11.7.2: + mocha@11.7.3: dependencies: browser-stdout: 1.3.1 chokidar: 4.0.3 @@ -10402,12 +10572,12 @@ snapshots: possible-typed-array-names: 1.1.0 reflect.getprototypeof: 1.0.10 - typescript-eslint@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2): + typescript-eslint@8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2): dependencies: - '@typescript-eslint/eslint-plugin': 8.44.1(@typescript-eslint/parser@8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2) - '@typescript-eslint/parser': 8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2) - '@typescript-eslint/typescript-estree': 8.44.1(typescript@5.9.2) - '@typescript-eslint/utils': 8.44.1(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2) + '@typescript-eslint/eslint-plugin': 8.45.0(@typescript-eslint/parser@8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2))(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2) + '@typescript-eslint/parser': 8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2) + '@typescript-eslint/typescript-estree': 8.45.0(typescript@5.9.2) + '@typescript-eslint/utils': 8.45.0(eslint@9.36.0(jiti@2.6.0))(typescript@5.9.2) eslint: 9.36.0(jiti@2.6.0) typescript: 5.9.2 transitivePeerDependencies: @@ -10427,7 +10597,7 @@ snapshots: has-symbols: 1.1.0 which-boxed-primitive: 1.1.1 - undici-types@7.12.0: {} + undici-types@7.13.0: {} unicode-canonical-property-names-ecmascript@2.0.1: {} diff --git a/src/bin/generateDocs.js b/src/bin/generateDocs.js index d68eebcc7..6ffc9ffcb 100644 --- a/src/bin/generateDocs.js +++ b/src/bin/generateDocs.js @@ -258,14 +258,14 @@ const generateDocs = async () => { } if (jIdx === 0) { - ret += (arr.length <= 1 ? 'A single' : 'An') + - ' options object has the following properties.\n\n'; + ret += (nesting > 3 ? '\n' : '') + (arr.length <= 1 ? 'A single' : 'An') + + ' options object has the following properties.\n'; } else { - ret += '\n\nThe next option is an object with the following properties.\n\n'; + ret += '\n\nThe next option is an object with the following properties.\n'; } if (schema.description) { - ret += `${escapeDescription(schema.description)}\n`; + ret += `\n${escapeDescription(schema.description)}\n`; } for (const [ @@ -282,10 +282,9 @@ const generateDocs = async () => { ); } - ret += '#'.repeat(nesting) + ` \`${property}\` + ret += '\n' + '#'.repeat(nesting) + ` \`${property}\` -${type === 'object' && innerSchema.properties ? '' : escapeDescription(description)} -`; +${type === 'object' && innerSchema.properties ? '' : escapeDescription(description) + '\n'}`; if (type === 'object' || type === 'array') { ret += convertFromSchema(innerSchema, 0, [], nesting + 1); } diff --git a/src/index-cjs.js b/src/index-cjs.js index 15e89d83f..752fb60ec 100644 --- a/src/index-cjs.js +++ b/src/index-cjs.js @@ -21,6 +21,7 @@ import checkTypes from './rules/checkTypes.js'; import checkValues from './rules/checkValues.js'; import convertToJsdocComments from './rules/convertToJsdocComments.js'; import emptyTags from './rules/emptyTags.js'; +import escapeInlineTags from './rules/escapeInlineTags.js'; import implementsOnClasses from './rules/implementsOnClasses.js'; import importsAsDependencies from './rules/importsAsDependencies.js'; import informativeDocs from './rules/informativeDocs.js'; @@ -101,6 +102,7 @@ index.rules = { 'check-values': checkValues, 'convert-to-jsdoc-comments': convertToJsdocComments, 'empty-tags': emptyTags, + 'escape-inline-tags': escapeInlineTags, 'implements-on-classes': implementsOnClasses, 'imports-as-dependencies': importsAsDependencies, 'informative-docs': informativeDocs, @@ -285,6 +287,7 @@ const createRecommendedRuleset = (warnOrError, flatName) => { 'jsdoc/check-values': warnOrError, 'jsdoc/convert-to-jsdoc-comments': 'off', 'jsdoc/empty-tags': warnOrError, + 'jsdoc/escape-inline-tags': warnOrError, 'jsdoc/implements-on-classes': warnOrError, 'jsdoc/imports-as-dependencies': 'off', 'jsdoc/informative-docs': 'off', @@ -451,6 +454,7 @@ const logicalRules = [ 'jsdoc/check-types', 'jsdoc/check-values', 'jsdoc/empty-tags', + 'jsdoc/escape-inline-tags', 'jsdoc/implements-on-classes', 'jsdoc/require-returns-check', 'jsdoc/require-yields-check', diff --git a/src/index.js b/src/index.js index b2670340c..7b6659868 100644 --- a/src/index.js +++ b/src/index.js @@ -27,6 +27,7 @@ import checkTypes from './rules/checkTypes.js'; import checkValues from './rules/checkValues.js'; import convertToJsdocComments from './rules/convertToJsdocComments.js'; import emptyTags from './rules/emptyTags.js'; +import escapeInlineTags from './rules/escapeInlineTags.js'; import implementsOnClasses from './rules/implementsOnClasses.js'; import importsAsDependencies from './rules/importsAsDependencies.js'; import informativeDocs from './rules/informativeDocs.js'; @@ -107,6 +108,7 @@ index.rules = { 'check-values': checkValues, 'convert-to-jsdoc-comments': convertToJsdocComments, 'empty-tags': emptyTags, + 'escape-inline-tags': escapeInlineTags, 'implements-on-classes': implementsOnClasses, 'imports-as-dependencies': importsAsDependencies, 'informative-docs': informativeDocs, @@ -291,6 +293,7 @@ const createRecommendedRuleset = (warnOrError, flatName) => { 'jsdoc/check-values': warnOrError, 'jsdoc/convert-to-jsdoc-comments': 'off', 'jsdoc/empty-tags': warnOrError, + 'jsdoc/escape-inline-tags': warnOrError, 'jsdoc/implements-on-classes': warnOrError, 'jsdoc/imports-as-dependencies': 'off', 'jsdoc/informative-docs': 'off', @@ -457,6 +460,7 @@ const logicalRules = [ 'jsdoc/check-types', 'jsdoc/check-values', 'jsdoc/empty-tags', + 'jsdoc/escape-inline-tags', 'jsdoc/implements-on-classes', 'jsdoc/require-returns-check', 'jsdoc/require-yields-check', diff --git a/src/rules.d.ts b/src/rules.d.ts index c98c83687..e6780aaee 100644 --- a/src/rules.d.ts +++ b/src/rules.d.ts @@ -82,7 +82,6 @@ export interface Rules { /** * An object with any of the following spacing keys set to an integer. * If a spacing is not defined, it defaults to one. - * */ customSpacings?: { /** @@ -437,7 +436,6 @@ export interface Rules { * * Defaults to `ArrowFunctionExpression`, `FunctionDeclaration`, * `FunctionExpression`, `TSDeclareFunction`. - * */ contexts?: ( | string @@ -496,7 +494,6 @@ export interface Rules { * ``` * * Defaults to `multi`. - * */ enforceJsdocLineStyle?: "multi" | "single"; /** @@ -526,12 +523,36 @@ export interface Rules { * 'jsdoc/empty-tags': ['error', {tags: ['event']}] * } * ``` - * */ tags?: string[]; } ]; + /** Reports use of JSDoc tags in non-tag positions (in the default "typescript" mode). */ + "jsdoc/escape-inline-tags": + | [] + | [ + { + /** + * A listing of tags you wish to allow unescaped. Defaults to an empty array. + */ + allowedInlineTags?: string[]; + /** + * Whether to enable the fixer. Defaults to `false`. + */ + enableFixer?: boolean; + /** + * How to escape the inline tag. + * + * May be "backticks" to enclose tags in backticks (treating as code segments), or + * "backslash" to escape tags with a backslash, i.e., `\@` + * + * Defaults to "backslash". + */ + fixType?: "backticks" | "backslash"; + } + ]; + /** Prohibits use of `@implements` on non-constructor functions (to enforce the tag only being used on classes/constructors). */ "jsdoc/implements-on-classes": | [] @@ -588,7 +609,6 @@ export interface Rules { * "a": ["an", "our"] * } * ``` - * */ aliases?: { /** @@ -610,7 +630,6 @@ export interface Rules { * ``` * * No tags are excluded by default. - * */ excludedTags?: string[]; /** @@ -628,7 +647,6 @@ export interface Rules { * ```json * ["a", "an", "i", "in", "of", "s", "the"] * ``` - * */ uselessWords?: string[]; } @@ -642,26 +660,22 @@ export interface Rules { /** * Whether to additionally check the start of blocks, such as classes or functions. * Defaults to `false`. - * */ checkBlockStarts?: boolean; /** * An array of tags whose presence in the JSDoc block will prevent the * application of the rule. Defaults to `['type']` (i.e., if `@type` is present, * lines before the block will not be added). - * */ excludedTags?: string[]; /** * This option excludes cases where the JSDoc block occurs on the same line as a * preceding code or comment. Defaults to `true`. - * */ ignoreSameLine?: boolean; /** * This option excludes cases where the JSDoc block is only one line long. * Defaults to `true`. - * */ ignoreSingleLines?: boolean; /** @@ -689,7 +703,6 @@ export interface Rules { * * See the ["AST and Selectors"](../#advanced-ast-and-selectors) * section of our Advanced docs for more on the expected format. - * */ contexts?: ( | string @@ -771,7 +784,6 @@ export interface Rules { * * This can be overridden per tag or for the main block description by setting * `message` within `tags` or `mainDescription`, respectively. - * */ message?: string; /** @@ -869,7 +881,6 @@ export interface Rules { * tag of the desired tag and/or name and no `disallowName` (or `allowName`) is * supplied. In such a case, only one error will be reported, but no fixer will * be applied, however. - * */ match: { /** @@ -958,7 +969,6 @@ export interface Rules { * lines. * * Defaults to `['*']`. - * */ multilineTags?: "*" | string[]; /** @@ -983,7 +993,6 @@ export interface Rules { * are whitelisted in `singleLineTags`. * * Defaults to `false`. - * */ noSingleLineBlocks?: boolean; /** @@ -1004,7 +1013,6 @@ export interface Rules { * descriptions. * * Defaults to `null`. - * */ requireSingleLineUnderCount?: number; /** @@ -1031,7 +1039,6 @@ export interface Rules { * * Defaults to `['ts-check', 'ts-expect-error', 'ts-ignore', 'ts-nocheck']` * (some directives [used by TypeScript](https://www.typescriptlang.org/docs/handbook/intro-to-js-ts.html#ts-check)). - * */ ignore?: string[]; /** @@ -1239,7 +1246,6 @@ export interface Rules { * * See the ["AST and Selectors"](../#advanced-ast-and-selectors) * section of our Advanced docs for more on the expected format. - * */ contexts?: ( | string @@ -1332,7 +1338,6 @@ export interface Rules { * }] * } * ``` - * */ tags?: { /** @@ -1452,7 +1457,6 @@ export interface Rules { * its "description" (e.g., for `@returns {someType} some description`, the * description is `some description` while for `@some-tag xyz`, the description * is `xyz`). - * */ tags?: string[]; } @@ -1583,8 +1587,6 @@ export interface Rules { * in this configuration object regardless of whether you have configured * `fileoverview` instead of `file` on `tagNamePreference` (i.e., `fileoverview` * will be checked, but you must use `file` on the configuration object). - * - * */ tags?: { /** @@ -1615,7 +1617,6 @@ export interface Rules { * `'*': 'always'` to apply hyphen checking to any tag (besides the preferred * `@param` tag which follows the main string option setting and besides any * other `tags` entries). - * */ tags?: | { @@ -1646,7 +1647,6 @@ export interface Rules { * getters should be checked but only when there is no setter. This may be useful * if one only wishes documentation on one of the two accessors. Defaults to * `false`. - * */ checkGetters?: boolean | "no-setter"; /** @@ -1701,7 +1701,6 @@ export interface Rules { * function/method names are sufficient for themselves as documentation). * * Defaults to `false`. - * */ exemptEmptyFunctions?: boolean; /** @@ -1734,7 +1733,6 @@ export interface Rules { * - `esm` - ESM exports are checked for JSDoc comments (Defaults to `true`) * - `cjs` - CommonJS exports are checked for JSDoc comments (Defaults to `true`) * - `window` - Window global exports are checked for JSDoc comments - * */ publicOnly?: | boolean @@ -1801,13 +1799,11 @@ export interface Rules { /** * Numeric to indicate the number at which to begin auto-incrementing roots. * Defaults to `0`. - * */ autoIncrementBase?: number; /** * A value indicating whether `constructor`s should be checked. Defaults to * `true`. - * */ checkConstructors?: boolean; /** @@ -1824,7 +1820,6 @@ export interface Rules { * implied to be `false` (i.e., the inside of the roots will not be checked * either, e.g., it will also not complain if `a` or `b` do not have their own * documentation). Defaults to `true`. - * */ checkDestructuredRoots?: boolean; /** @@ -1882,7 +1877,6 @@ export interface Rules { * function quux ({num, ...extra}) { * } * ``` - * */ checkRestProperty?: boolean; /** @@ -1936,7 +1930,6 @@ export interface Rules { * * See the ["AST and Selectors"](../#advanced-ast-and-selectors) * section of our Advanced docs for more on the expected format. - * */ contexts?: ( | string @@ -1983,7 +1976,6 @@ export interface Rules { * type to use. * * Defaults to `true`. - * */ enableRestElementFixer?: boolean; /** @@ -2134,7 +2126,6 @@ export interface Rules { * * See the ["AST and Selectors"](../#advanced-ast-and-selectors) * section of our Advanced docs for more on the expected format. - * */ contexts?: ( | string @@ -2287,7 +2278,6 @@ export interface Rules { * - `esm` - ESM exports are checked for `@returns` JSDoc comments (Defaults to `true`) * - `cjs` - CommonJS exports are checked for `@returns` JSDoc comments (Defaults to `true`) * - `window` - Window global exports are checked for `@returns` JSDoc comments - * */ publicOnly?: | boolean @@ -2444,7 +2434,6 @@ export interface Rules { * ``` * * Defaults to `false`. - * */ requireSeparateTemplates?: boolean; } @@ -2848,7 +2837,6 @@ export interface Rules { * 'todo', * ]}]; * ``` - * */ tagSequence?: { /** diff --git a/src/rules/checkLineAlignment.js b/src/rules/checkLineAlignment.js index 8555073f2..5f2d9da03 100644 --- a/src/rules/checkLineAlignment.js +++ b/src/rules/checkLineAlignment.js @@ -338,8 +338,7 @@ ensure that at least one space is present after the asterisk delimiter.`, customSpacings: { additionalProperties: false, description: `An object with any of the following spacing keys set to an integer. -If a spacing is not defined, it defaults to one. -`, +If a spacing is not defined, it defaults to one.`, properties: { postDelimiter: { description: 'Affects spacing after the asterisk (e.g., `* @param`)', diff --git a/src/rules/convertToJsdocComments.js b/src/rules/convertToJsdocComments.js index 162793339..523e7cace 100644 --- a/src/rules/convertToJsdocComments.js +++ b/src/rules/convertToJsdocComments.js @@ -319,8 +319,7 @@ Supplying your own value overrides the defaults.`, Can either be strings or an object with a \`context\` string and an optional, default \`false\` \`inlineCommentBlock\` boolean. Defaults to \`ArrowFunctionExpression\`, \`FunctionDeclaration\`, -\`FunctionExpression\`, \`TSDeclareFunction\`. -`, +\`FunctionExpression\`, \`TSDeclareFunction\`.`, items: { anyOf: [ { @@ -417,8 +416,7 @@ be converted to \`multi\` style JSDoc comments.) /** Some text */ \`\`\` -Defaults to \`multi\`. -`, +Defaults to \`multi\`.`, enum: [ 'multi', 'single', ], diff --git a/src/rules/emptyTags.js b/src/rules/emptyTags.js index afa31f487..2ebb05dbc 100644 --- a/src/rules/emptyTags.js +++ b/src/rules/emptyTags.js @@ -91,8 +91,7 @@ add them within this option. { 'jsdoc/empty-tags': ['error', {tags: ['event']}] } -\`\`\` -`, +\`\`\``, items: { type: 'string', }, diff --git a/src/rules/escapeInlineTags.js b/src/rules/escapeInlineTags.js new file mode 100644 index 000000000..baa6d0e66 --- /dev/null +++ b/src/rules/escapeInlineTags.js @@ -0,0 +1,189 @@ +import iterateJsdoc from '../iterateJsdoc.js'; + +export default iterateJsdoc(({ + context, + jsdoc, + settings, + utils, +}) => { + const { + mode, + } = settings; + + if (mode !== 'typescript') { + return; + } + + const { + allowedInlineTags = [], + enableFixer = false, + fixType = 'backslash', + } = context.options[0] || {}; + + const { + description, + } = utils.getDescription(); + + /** @type {string[]} */ + const tagNames = []; + + /** @type {number[]} */ + const indexes = []; + + const unescapedInlineTagRegex = /(?:^|\s)@(\w+)/gv; + for (const [ + idx, + descLine, + ] of ( + description.startsWith('\n') ? description.slice(1) : description + ).split('\n').entries() + ) { + descLine.replaceAll(unescapedInlineTagRegex, (_, tagName) => { + if (allowedInlineTags.includes(tagName)) { + return _; + } + + tagNames.push(tagName); + indexes.push(idx); + + return _; + }); + } + + for (const [ + idx, + tagName, + ] of tagNames.entries()) { + utils.reportJSDoc( + `Unexpected inline JSDoc tag. Did you mean to use {@${tagName}}, \\@${tagName}, or \`@${tagName}\`?`, + { + line: indexes[idx] + 1, + }, + enableFixer ? + () => { + utils.setBlockDescription((info, seedTokens, descLines) => { + return descLines.map((desc) => { + const newDesc = desc.replaceAll( + new RegExp(`(^|\\s)@${ + // No need to escape, as contains only safe characters + tagName + }`, 'gv'), + fixType === 'backticks' ? '$1`@' + tagName + '`' : '$1\\@' + tagName, + ); + + return { + number: 0, + source: '', + tokens: seedTokens({ + ...info, + description: newDesc, + postDelimiter: newDesc.trim() ? ' ' : '', + }), + }; + }); + }); + } : + null, + ); + } + + /** + * @param {string} tagName + * @returns {[ + * RegExp, + * (description: string) => string + * ]} + */ + const escapeInlineTags = (tagName) => { + const regex = new RegExp(`(^|\\s)@${ + // No need to escape, as contains only safe characters + tagName + }`, 'gv'); + + return [ + regex, + /** + * @param {string} desc + */ + (desc) => { + return desc.replaceAll( + regex, + fixType === 'backticks' ? '$1`@' + tagName + '`' : '$1\\@' + tagName, + ); + }, + ]; + }; + + for (const tag of jsdoc.tags) { + if (tag.tag === 'example') { + continue; + } + + /** @type {string} */ + let tagName = ''; + while (/** @type {string[]} */ ( + utils.getTagDescription(tag, true) + // eslint-disable-next-line no-loop-func -- Safe + ).some((desc) => { + tagName = unescapedInlineTagRegex.exec(desc)?.[1] ?? ''; + if (allowedInlineTags.includes(tagName)) { + return false; + } + + return tagName; + })) { + const line = utils.setTagDescription(tag, ...escapeInlineTags(tagName)) + + tag.source[0].number; + utils.reportJSDoc( + `Unexpected inline JSDoc tag. Did you mean to use {@${tagName}}, \\@${tagName}, or \`@${tagName}\`?`, + { + line, + }, + enableFixer ? () => {} : null, + true, + ); + } + } +}, { + iterateAllJsdocs: true, + meta: { + docs: { + description: 'Reports use of JSDoc tags in non-tag positions (in the default "typescript" mode).', + url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/escape-inline-tags.md#repos-sticky-header', + }, + fixable: 'code', + schema: [ + { + additionalProperties: false, + properties: { + allowedInlineTags: { + description: 'A listing of tags you wish to allow unescaped. Defaults to an empty array.', + items: { + type: 'string', + }, + type: 'array', + }, + enableFixer: { + description: 'Whether to enable the fixer. Defaults to `false`.', + type: 'boolean', + }, + fixType: { + description: `How to escape the inline tag. + +May be "backticks" to enclose tags in backticks (treating as code segments), or +"backslash" to escape tags with a backslash, i.e., \`\\@\` + +Defaults to "backslash".`, + enum: [ + 'backticks', + 'backslash', + ], + type: 'string', + }, + }, + type: 'object', + }, + ], + type: 'suggestion', + }, +}); diff --git a/src/rules/informativeDocs.js b/src/rules/informativeDocs.js index 3be782e91..c625ea153 100644 --- a/src/rules/informativeDocs.js +++ b/src/rules/informativeDocs.js @@ -171,8 +171,7 @@ The default \`aliases\` option is: { "a": ["an", "our"] } -\`\`\` -`, +\`\`\``, patternProperties: { '.*': { items: { @@ -194,8 +193,7 @@ function computeTypes(node) { } \`\`\` -No tags are excluded by default. -`, +No tags are excluded by default.`, items: { type: 'string', }, @@ -215,8 +213,7 @@ The default \`uselessWords\` option is: \`\`\`json ["a", "an", "i", "in", "of", "s", "the"] -\`\`\` -`, +\`\`\``, items: { type: 'string', }, diff --git a/src/rules/linesBeforeBlock.js b/src/rules/linesBeforeBlock.js index c1983fb59..984cff98a 100644 --- a/src/rules/linesBeforeBlock.js +++ b/src/rules/linesBeforeBlock.js @@ -109,15 +109,13 @@ export default iterateJsdoc(({ properties: { checkBlockStarts: { description: `Whether to additionally check the start of blocks, such as classes or functions. -Defaults to \`false\`. -`, +Defaults to \`false\`.`, type: 'boolean', }, excludedTags: { description: `An array of tags whose presence in the JSDoc block will prevent the application of the rule. Defaults to \`['type']\` (i.e., if \`@type\` is present, -lines before the block will not be added). -`, +lines before the block will not be added).`, items: { type: 'string', }, @@ -125,14 +123,12 @@ lines before the block will not be added). }, ignoreSameLine: { description: `This option excludes cases where the JSDoc block occurs on the same line as a -preceding code or comment. Defaults to \`true\`. -`, +preceding code or comment. Defaults to \`true\`.`, type: 'boolean', }, ignoreSingleLines: { description: `This option excludes cases where the JSDoc block is only one line long. -Defaults to \`true\`. -`, +Defaults to \`true\`.`, type: 'boolean', }, lines: { diff --git a/src/rules/matchDescription.js b/src/rules/matchDescription.js index f06caa8ff..88b472d24 100644 --- a/src/rules/matchDescription.js +++ b/src/rules/matchDescription.js @@ -184,8 +184,7 @@ Overrides the default contexts (\`ArrowFunctionExpression\`, \`FunctionDeclarati JSDoc block throughout your files. See the ["AST and Selectors"](../#advanced-ast-and-selectors) -section of our Advanced docs for more on the expected format. -`, +section of our Advanced docs for more on the expected format.`, items: { anyOf: [ { @@ -302,8 +301,7 @@ literal, e.g., \`/[A-Z].*\\./vi\`. \`\`\` This can be overridden per tag or for the main block description by setting -\`message\` within \`tags\` or \`mainDescription\`, respectively. -`, +\`message\` within \`tags\` or \`mainDescription\`, respectively.`, type: 'string', }, nonemptyTags: { diff --git a/src/rules/matchName.js b/src/rules/matchName.js index aef3fc9ee..eb179ac76 100644 --- a/src/rules/matchName.js +++ b/src/rules/matchName.js @@ -118,8 +118,7 @@ fixes found by the likes of \`disallowName\` even when a different tag has the disallowed name. An alternative is to ensure that \`comment\` finds the specific tag of the desired tag and/or name and no \`disallowName\` (or \`allowName\`) is supplied. In such a case, only one error will be reported, but no fixer will -be applied, however. -`, +be applied, however.`, items: { additionalProperties: false, properties: { diff --git a/src/rules/multilineBlocks.js b/src/rules/multilineBlocks.js index aca726673..6f1356dbf 100644 --- a/src/rules/multilineBlocks.js +++ b/src/rules/multilineBlocks.js @@ -494,8 +494,7 @@ such a tag will cause multiline blocks to be allowed. You may set this to an empty array to prevent any tag from permitting multiple lines. -Defaults to \`['*']\`. -`, +Defaults to \`['*']\`.`, }, noFinalLineText: { description: `For multiline blocks, any non-whitespace text preceding the \`*/\` on the final @@ -518,8 +517,7 @@ Defaults to \`false\`.`, description: `If this is \`true\`, any single line blocks will be reported, except those which are whitelisted in \`singleLineTags\`. -Defaults to \`false\`. -`, +Defaults to \`false\`.`, type: 'boolean', }, noZeroLineText: { @@ -539,8 +537,7 @@ for such cases. Blocks are not reported which have multi-line descriptions, multiple tags, a block description and tag, or tags with multi-line types or descriptions. -Defaults to \`null\`. -`, +Defaults to \`null\`.`, type: 'number', }, singleLineTags: { diff --git a/src/rules/noBadBlocks.js b/src/rules/noBadBlocks.js index c4033bf10..c26998d6f 100644 --- a/src/rules/noBadBlocks.js +++ b/src/rules/noBadBlocks.js @@ -106,8 +106,7 @@ export default iterateJsdoc(({ a multi-comment block and at-sign \`/* @\`. Defaults to \`['ts-check', 'ts-expect-error', 'ts-ignore', 'ts-nocheck']\` -(some directives [used by TypeScript](https://www.typescriptlang.org/docs/handbook/intro-to-js-ts.html#ts-check)). -`, +(some directives [used by TypeScript](https://www.typescriptlang.org/docs/handbook/intro-to-js-ts.html#ts-check)).`, items: { type: 'string', }, diff --git a/src/rules/noTypes.js b/src/rules/noTypes.js index bf7b8705d..2bf3a74cc 100644 --- a/src/rules/noTypes.js +++ b/src/rules/noTypes.js @@ -77,8 +77,7 @@ expression, i.e., \`@callback\` or \`@function\` (or its aliases \`@func\` or \`@method\`) (including those associated with an \`@interface\`). See the ["AST and Selectors"](../#advanced-ast-and-selectors) -section of our Advanced docs for more on the expected format. -`, +section of our Advanced docs for more on the expected format.`, items: { anyOf: [ { diff --git a/src/rules/requireAsteriskPrefix.js b/src/rules/requireAsteriskPrefix.js index b8dcbfba3..51cd2bbf6 100644 --- a/src/rules/requireAsteriskPrefix.js +++ b/src/rules/requireAsteriskPrefix.js @@ -180,8 +180,7 @@ which applies to the main JSDoc block description. } }] } -\`\`\` -`, +\`\`\``, properties: { always: { description: `If it is \`"always"\` then a problem is raised when there is no asterisk diff --git a/src/rules/requireDescriptionCompleteSentence.js b/src/rules/requireDescriptionCompleteSentence.js index 37767bde2..faf8bdf11 100644 --- a/src/rules/requireDescriptionCompleteSentence.js +++ b/src/rules/requireDescriptionCompleteSentence.js @@ -346,8 +346,7 @@ All other tags will treat the text following the tag name, a space, and an optional curly-bracketed type expression (and another space) as part of its "description" (e.g., for \`@returns {someType} some description\`, the description is \`some description\` while for \`@some-tag xyz\`, the description -is \`xyz\`). -`, +is \`xyz\`).`, items: { type: 'string', }, diff --git a/src/rules/requireFileOverview.js b/src/rules/requireFileOverview.js index ad83ebc37..84c3c3e36 100644 --- a/src/rules/requireFileOverview.js +++ b/src/rules/requireFileOverview.js @@ -176,9 +176,7 @@ have a way to allow multiple licenses for the whole page by using the SPDX Note that the tag names are the main JSDoc tag name, so you should use \`file\` in this configuration object regardless of whether you have configured \`fileoverview\` instead of \`file\` on \`tagNamePreference\` (i.e., \`fileoverview\` -will be checked, but you must use \`file\` on the configuration object). - -`, +will be checked, but you must use \`file\` on the configuration object).`, patternProperties: { '.*': { additionalProperties: false, diff --git a/src/rules/requireHyphenBeforeParamDescription.js b/src/rules/requireHyphenBeforeParamDescription.js index 336e4a12c..6e48ca4c9 100644 --- a/src/rules/requireHyphenBeforeParamDescription.js +++ b/src/rules/requireHyphenBeforeParamDescription.js @@ -199,8 +199,7 @@ other tags besides the \`@param\` tag (or the \`@arg\` tag if so set).`, to ensure \`@property\` never uses hyphens. A key can also be set as \`*\`, e.g., \`'*': 'always'\` to apply hyphen checking to any tag (besides the preferred \`@param\` tag which follows the main string option setting and besides any - other \`tags\` entries). -`, + other \`tags\` entries).`, }, }, type: 'object', diff --git a/src/rules/requireJsdoc.js b/src/rules/requireJsdoc.js index ff6547f8a..6b7895562 100644 --- a/src/rules/requireJsdoc.js +++ b/src/rules/requireJsdoc.js @@ -60,8 +60,7 @@ no parameters or return values are found.`, boolean, this option can be set to the string \`"no-setter"\` to indicate that getters should be checked but only when there is no setter. This may be useful if one only wishes documentation on one of the two accessors. Defaults to -\`false\`. -`, +\`false\`.`, }, checkSetters: { anyOf: [ @@ -143,8 +142,7 @@ Defaults to \`true\`.`, functions/methods with no parameters or return values (intended where function/method names are sufficient for themselves as documentation). -Defaults to \`false\`. -`, +Defaults to \`false\`.`, type: 'boolean', }, exemptOverloadedImplementations: { @@ -178,8 +176,7 @@ otherwise noted): - \`ancestorsOnly\` - Optimization to only check node ancestors to check if node is exported - \`esm\` - ESM exports are checked for JSDoc comments (Defaults to \`true\`) - \`cjs\` - CommonJS exports are checked for JSDoc comments (Defaults to \`true\`) -- \`window\` - Window global exports are checked for JSDoc comments -`, +- \`window\` - Window global exports are checked for JSDoc comments`, oneOf: [ { default: false, diff --git a/src/rules/requireParam.js b/src/rules/requireParam.js index e32a10c9e..8c02470d1 100644 --- a/src/rules/requireParam.js +++ b/src/rules/requireParam.js @@ -548,15 +548,13 @@ export default iterateJsdoc(({ autoIncrementBase: { default: 0, description: `Numeric to indicate the number at which to begin auto-incrementing roots. -Defaults to \`0\`. -`, +Defaults to \`0\`.`, type: 'integer', }, checkConstructors: { default: true, description: `A value indicating whether \`constructor\`s should be checked. Defaults to -\`true\`. -`, +\`true\`.`, type: 'boolean', }, checkDestructured: { @@ -574,8 +572,7 @@ the \`{a, b}\` object parameter). If \`checkDestructuredRoots\` is \`false\`, \`checkDestructured\` will also be implied to be \`false\` (i.e., the inside of the roots will not be checked either, e.g., it will also not complain if \`a\` or \`b\` do not have their own -documentation). Defaults to \`true\`. -`, +documentation). Defaults to \`true\`.`, type: 'boolean', }, checkGetters: { @@ -634,8 +631,7 @@ Nor will this: */ function quux ({num, ...extra}) { } -\`\`\` -`, +\`\`\``, type: 'boolean', }, checkSetters: { @@ -689,8 +685,7 @@ Overrides the default contexts (\`ArrowFunctionExpression\`, \`FunctionDeclarati which are checked. See the ["AST and Selectors"](../#advanced-ast-and-selectors) -section of our Advanced docs for more on the expected format. -`, +section of our Advanced docs for more on the expected format.`, items: { anyOf: [ { @@ -749,8 +744,7 @@ function baar ([a, ...extra]) { Note that the type \`any\` is included since we don't know of any specific type to use. -Defaults to \`true\`. -`, +Defaults to \`true\`.`, type: 'boolean', }, enableRootFixer: { diff --git a/src/rules/requireParamName.js b/src/rules/requireParamName.js index dc4f6a373..f3da30a23 100644 --- a/src/rules/requireParamName.js +++ b/src/rules/requireParamName.js @@ -38,8 +38,7 @@ expression, i.e., \`@callback\` or \`@function\` (or its aliases \`@func\` or \`@method\`) (including those associated with an \`@interface\`). See the ["AST and Selectors"](../#advanced-ast-and-selectors) -section of our Advanced docs for more on the expected format. -`, +section of our Advanced docs for more on the expected format.`, items: { anyOf: [ { diff --git a/src/rules/requireReturns.js b/src/rules/requireReturns.js index e5e01ef10..53d9e670c 100644 --- a/src/rules/requireReturns.js +++ b/src/rules/requireReturns.js @@ -254,8 +254,7 @@ otherwise noted): - \`ancestorsOnly\` - Optimization to only check node ancestors to check if node is exported - \`esm\` - ESM exports are checked for \`@returns\` JSDoc comments (Defaults to \`true\`) - \`cjs\` - CommonJS exports are checked for \`@returns\` JSDoc comments (Defaults to \`true\`) -- \`window\` - Window global exports are checked for \`@returns\` JSDoc comments -`, +- \`window\` - Window global exports are checked for \`@returns\` JSDoc comments`, oneOf: [ { default: false, diff --git a/src/rules/requireTemplate.js b/src/rules/requireTemplate.js index c6cc06941..8f4d42f42 100644 --- a/src/rules/requireTemplate.js +++ b/src/rules/requireTemplate.js @@ -214,8 +214,7 @@ templates of this format: */ \`\`\` -Defaults to \`false\`. -`, +Defaults to \`false\`.`, type: 'boolean', }, }, diff --git a/src/rules/sortTags.js b/src/rules/sortTags.js index 1e021545a..e2401f286 100644 --- a/src/rules/sortTags.js +++ b/src/rules/sortTags.js @@ -729,8 +729,7 @@ a fixed order that doesn't change into the future, supply your own 'deprecated', 'todo', ]}]; -\`\`\` -`, +\`\`\``, items: { additionalProperties: false, properties: { diff --git a/test/rules/assertions/checkAlignment.js b/test/rules/assertions/checkAlignment.js index bd8b6fc66..f94991a05 100644 --- a/test/rules/assertions/checkAlignment.js +++ b/test/rules/assertions/checkAlignment.js @@ -242,8 +242,7 @@ export const myVar = {/** * This is JSDoc */ myProperty: 'hello' -} -`, +}`, errors: [ { line: 3, @@ -255,8 +254,7 @@ export const myVar = {/** * This is JSDoc */ myProperty: 'hello' -} -`, +}`, }, { code: ` diff --git a/test/rules/assertions/escapeInlineTags.js b/test/rules/assertions/escapeInlineTags.js new file mode 100644 index 000000000..c75d0a022 --- /dev/null +++ b/test/rules/assertions/escapeInlineTags.js @@ -0,0 +1,415 @@ +export default { + invalid: [ + { + code: ` + /** + * + * Whether to include a @yearly, @monthly etc text labels in the generated expression. + */ + `, + errors: [ + { + line: 4, + message: 'Unexpected inline JSDoc tag. Did you mean to use {@yearly}, \\@yearly, or `@yearly`?', + }, + { + line: 4, + message: 'Unexpected inline JSDoc tag. Did you mean to use {@monthly}, \\@monthly, or `@monthly`?', + }, + ], + options: [ + { + enableFixer: true, + }, + ], + output: ` + /** + * + * Whether to include a \\@yearly, @monthly etc text labels in the generated expression. + */ + `, + }, + { + code: ` + /** + * Some text + * Whether to include a @yearly, @monthly etc text labels in the generated expression. + */ + `, + errors: [ + { + line: 4, + message: 'Unexpected inline JSDoc tag. Did you mean to use {@yearly}, \\@yearly, or `@yearly`?', + }, + { + line: 4, + message: 'Unexpected inline JSDoc tag. Did you mean to use {@monthly}, \\@monthly, or `@monthly`?', + }, + ], + options: [ + { + enableFixer: true, + }, + ], + output: ` + /** + * Some text + * Whether to include a \\@yearly, @monthly etc text labels in the generated expression. + */ + `, + }, + { + code: ` + /** + * Whether to include a @yearly, @yearly etc text labels in the generated expression. + */ + `, + errors: [ + { + line: 3, + message: 'Unexpected inline JSDoc tag. Did you mean to use {@yearly}, \\@yearly, or `@yearly`?', + }, + { + line: 3, + message: 'Unexpected inline JSDoc tag. Did you mean to use {@yearly}, \\@yearly, or `@yearly`?', + }, + ], + options: [ + { + enableFixer: true, + }, + ], + output: ` + /** + * Whether to include a \\@yearly, \\@yearly etc text labels in the generated expression. + */ + `, + }, + { + code: ` + /** + * Whether to include a @yearly, + * or @yearly etc text labels in the generated expression. + */ + `, + errors: [ + { + line: 3, + message: 'Unexpected inline JSDoc tag. Did you mean to use {@yearly}, \\@yearly, or `@yearly`?', + }, + { + line: 4, + message: 'Unexpected inline JSDoc tag. Did you mean to use {@yearly}, \\@yearly, or `@yearly`?', + }, + ], + options: [ + { + enableFixer: true, + }, + ], + output: ` + /** + * Whether to include a \\@yearly, + * or \\@yearly etc text labels in the generated expression. + */ + `, + }, + { + code: ` + /** + * Whether to include a @yearly, @monthly etc text labels in the generated expression. + */ + `, + errors: [ + { + line: 3, + message: 'Unexpected inline JSDoc tag. Did you mean to use {@yearly}, \\@yearly, or `@yearly`?', + }, + ], + options: [ + { + allowedInlineTags: [ + 'monthly', + ], + enableFixer: true, + fixType: 'backticks', + }, + ], + output: ` + /** + * Whether to include a \`@yearly\`, @monthly etc text labels in the generated expression. + */ + `, + }, + { + code: ` + /** + * Some description @sth + */ + `, + errors: [ + { + line: 3, + message: 'Unexpected inline JSDoc tag. Did you mean to use {@sth}, \\@sth, or `@sth`?', + }, + ], + options: [ + { + enableFixer: true, + }, + ], + output: ` + /** + * Some description \\@sth + */ + `, + }, + { + code: ` + /** + * Some description @sth + */ + `, + errors: [ + { + line: 3, + message: 'Unexpected inline JSDoc tag. Did you mean to use {@sth}, \\@sth, or `@sth`?', + }, + ], + options: [ + { + enableFixer: false, + }, + ], + }, + { + code: ` + /** + * @param includeNonStandard Whether to include a @yearly, @monthly etc text labels in the generated expression. + */ + `, + errors: [ + { + line: 3, + message: 'Unexpected inline JSDoc tag. Did you mean to use {@yearly}, \\@yearly, or `@yearly`?', + }, + { + line: 3, + message: 'Unexpected inline JSDoc tag. Did you mean to use {@monthly}, \\@monthly, or `@monthly`?', + }, + ], + options: [ + { + enableFixer: true, + }, + ], + output: ` + /** + * @param includeNonStandard Whether to include a \\@yearly, @monthly etc text labels in the generated expression. + */ + `, + }, + { + code: ` + /** + * @param includeNonStandard Whether to include a @yearly, @monthly etc text labels in the generated expression. + */ + `, + errors: [ + { + line: 3, + message: 'Unexpected inline JSDoc tag. Did you mean to use {@yearly}, \\@yearly, or `@yearly`?', + }, + ], + options: [ + { + allowedInlineTags: [ + 'monthly', + ], + enableFixer: true, + fixType: 'backticks', + }, + ], + output: ` + /** + * @param includeNonStandard Whether to include a \`@yearly\`, @monthly etc text labels in the generated expression. + */ + `, + }, + { + code: ` + /** + * @param aName @sth + */ + `, + errors: [ + { + line: 3, + message: 'Unexpected inline JSDoc tag. Did you mean to use {@sth}, \\@sth, or `@sth`?', + }, + ], + options: [ + { + enableFixer: true, + }, + ], + output: ` + /** + * @param aName \\@sth + */ + `, + }, + { + code: ` + /** + * @param aName @sth + * and @another + * @param anotherName @yetAnother + */ + `, + errors: [ + { + line: 3, + message: 'Unexpected inline JSDoc tag. Did you mean to use {@sth}, \\@sth, or `@sth`?', + }, + { + line: 4, + message: 'Unexpected inline JSDoc tag. Did you mean to use {@another}, \\@another, or `@another`?', + }, + { + line: 5, + message: 'Unexpected inline JSDoc tag. Did you mean to use {@yetAnother}, \\@yetAnother, or `@yetAnother`?', + }, + ], + options: [ + { + enableFixer: true, + }, + ], + output: ` + /** + * @param aName \\@sth + * and @another + * @param anotherName @yetAnother + */ + `, + }, + { + code: ` + /** + * @param aName @sth + */ + `, + errors: [ + { + line: 3, + message: 'Unexpected inline JSDoc tag. Did you mean to use {@sth}, \\@sth, or `@sth`?', + }, + ], + options: [ + { + enableFixer: false, + }, + ], + }, + ], + valid: [ + { + code: ` + /** + * A description with an escaped \\@tag. + */ + `, + }, + { + code: ` + /** + * A description with a markdown \`@tag\`. + */ + `, + }, + { + code: ` + /** + * A description with a non@tag. + */ + `, + }, + { + code: ` + /** + * @param {SomeType} aName A description with an escaped \\@tag. + */ + `, + }, + { + code: ` + /** + * @param {SomeType} aName A description with a markdown \`@tag\`. + */ + `, + }, + { + code: ` + /** + * @param {SomeType} aName A description with a non@tag. + */ + `, + }, + { + code: ` + /** + * {@link https://example.com} + */ + `, + }, + { + code: ` + /** + * A description with a {@link https://example.com} + */ + `, + }, + { + code: ` + /** + * @someTag {@link https://example.com} + */ + `, + }, + { + code: ` + /** + * @param {SomeType} aName {@link https://example.com} + */ + `, + }, + { + code: ` + /** + * @param {SomeType} aName A description with a {@link https://example.com}. + */ + `, + }, + { + code: ` + /** + * @example + * Here are some unescaped tags: @yearly, @monthly + */ + `, + }, + { + code: ` + /** + * Whether to include a @yearly, @monthly etc text labels in the generated expression. + */ + `, + settings: { + jsdoc: { + mode: 'jsdoc', + }, + }, + }, + ], +}; diff --git a/test/rules/ruleNames.json b/test/rules/ruleNames.json index 4fba26853..173f34ecf 100644 --- a/test/rules/ruleNames.json +++ b/test/rules/ruleNames.json @@ -13,6 +13,7 @@ "check-values", "convert-to-jsdoc-comments", "empty-tags", + "escape-inline-tags", "implements-on-classes", "imports-as-dependencies", "informative-docs",