-
-
Notifications
You must be signed in to change notification settings - Fork 169
Closed
Labels
Description
I've written a typedef comment at the top of my file:
/** @typedef {{ scope: any; [key: string]: string | Handler }} HandlerMapping */(mode = typescript)
The error is with the [key: string]: x bit.
Expected behavior
To pass valid-types check.
Actual behavior
{
"resource": "...",
"owner": "eslint",
"code": {
"value": "jsdoc/valid-types",
"target": {
"$mid": 1,
"external": "https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-valid-types",
"path": "/gajus/eslint-plugin-jsdoc",
"scheme": "https",
"authority": "github.com",
"fragment": "eslint-plugin-jsdoc-rules-valid-types"
}
},
"severity": 4,
"message": "Syntax error in type: { scope: any; [key: string]: string | Handler }",
"source": "eslint",
"startLineNumber": 13,
"startColumn": 1,
"endLineNumber": 13,
"endColumn": 1
}
ESLint Config
---
extends:
- plugin:jsdoc/recommended
plugins:
- jsdoc
settings:
jsdoc:
mode: typescriptESLint sample
/** @typedef {(...x: any[]) => void} Handler */
/** @typedef {{ scope: any; [key: string]: string | Handler }} HandlerMapping */Environment
- Node version: v15.12.0
- ESLint version v7.24.0
eslint-plugin-jsdocversion: 32.3.0