Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .README/rules/no-undefined-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ types for a tag, the function will silently ignore that tag, leaving it to
the `valid-types` rule to report parsing errors.

If you define your own tags, you can use `settings.jsdoc.structuredTags`
to indicate that a tag's `name` is "namepath-defining" (and should prevent
to indicate that a tag's `name` is "name-defining" or "namepath-defining" (and should prevent
reporting on use of that namepath elsewhere) and/or that a tag's `type` is
`false` (and should not be checked for types). If the `type` is an array, that
array's items will be considered as defined for the purposes of that tag.
Expand Down
1 change: 1 addition & 0 deletions .README/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ values are objects with the following optional properties:
name position (non-whitespace immediately after the tag and whitespace),
e.g., in `@throws This is an error`, "This" would normally be the name,
but "text" allows non-name text here also. This is the default.
- `"name-defining"` - Indicates the tag adds a name to definitions. May not be an arbitrary namepath, unlike `"namepath-defining"`
- `"namepath-defining"` - As with `namepath-referencing`, but also
indicates the tag adds a namepath to definitions, e.g., to prevent
`no-undefined-types` from reporting references to that namepath.
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-undefined-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ types for a tag, the function will silently ignore that tag, leaving it to
the `valid-types` rule to report parsing errors.

If you define your own tags, you can use `settings.jsdoc.structuredTags`
to indicate that a tag's `name` is "namepath-defining" (and should prevent
to indicate that a tag's `name` is "name-defining" or "namepath-defining" (and should prevent
reporting on use of that namepath elsewhere) and/or that a tag's `type` is
`false` (and should not be checked for types). If the `type` is an array, that
array's items will be considered as defined for the purposes of that tag.
Expand Down
46 changes: 46 additions & 0 deletions docs/rules/valid-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,15 @@ function quux (items) {
* @param {SomeType} aName An inline {@link} tag without content.
*/
// Message: Inline tag "link" missing content

/**
* With reserved word in type
* @param {Array<import>} foo
*/
function quux() {

}
// Message: Syntax error in type: Array<import>
````


Expand Down Expand Up @@ -919,5 +928,42 @@ export function onGlobalEvent (selector, type, callback, options) {
*/
function a () {}
// Settings: {"jsdoc":{"structuredTags":{"next":{"required":["type"]}}}}

/**
* With reserved word in name
* @typedef {SomeType} import
*/

/**
* With reserved word in namepath
* @param {SomeType} import
*/

/**
* @param readonly
*/

/**
* @param {boolean} readonly
*/

/**
* @param {object} params
* @param {boolean} params.readonly
*/

/**
* An object interface
* @typedef {Object} FooBar
* @property {boolean} readonly
* @property {boolean} private
* @property {boolean} public
* @property {boolean} constant
*/

/**
* @param {object} props
* @param {string} props.is
*/
````

1 change: 1 addition & 0 deletions docs/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ values are objects with the following optional properties:
name position (non-whitespace immediately after the tag and whitespace),
e.g., in `@throws This is an error`, "This" would normally be the name,
but "text" allows non-name text here also. This is the default.
- `"name-defining"` - Indicates the tag adds a name to definitions. May not be an arbitrary namepath, unlike `"namepath-defining"`
- `"namepath-defining"` - As with `namepath-referencing`, but also
indicates the tag adds a namepath to definitions, e.g., to prevent
`no-undefined-types` from reporting references to that namepath.
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"url": "http://gajus.com"
},
"dependencies": {
"@es-joy/jsdoccomment": "~0.65.2",
"@es-joy/jsdoccomment": "~0.67.2",
"are-docs-informative": "^0.0.2",
"comment-parser": "1.4.1",
"debug": "^4.4.3",
Expand Down Expand Up @@ -41,7 +41,7 @@
"@types/estree": "^1.0.8",
"@types/json-schema": "^7.0.15",
"@types/mocha": "^10.0.10",
"@types/node": "^24.6.1",
"@types/node": "^24.6.2",
"@types/semver": "^7.7.1",
"@types/spdx-expression-parse": "^3.0.5",
"@typescript-eslint/types": "^8.45.0",
Expand All @@ -52,17 +52,17 @@
"camelcase": "^8.0.0",
"chai": "^6.2.0",
"decamelize": "^6.0.1",
"eslint": "9.36.0",
"eslint-config-canonical": "^45.0.0",
"eslint": "9.37.0",
"eslint-config-canonical": "^45.0.1",
"gitdown": "^4.1.1",
"glob": "^11.0.3",
"globals": "^16.4.0",
"husky": "^9.1.7",
"jsdoc-type-pratt-parser": "^6.1.2",
"jsdoc-type-pratt-parser": "^6.3.2",
"json-schema": "^0.4.0",
"json-schema-to-typescript": "^15.0.4",
"lint-staged": "^16.2.3",
"mocha": "^11.7.3",
"mocha": "^11.7.4",
"open-editor": "^5.1.0",
"replace": "^1.2.2",
"rimraf": "^6.0.1",
Expand Down
Loading
Loading