You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** * @returns {Promise<{publicKey, privateKey}>} - The public and private key */
Having the above (incorrect) TypeScript definition yields this output:
> eslint --max-warnings=0 .
Oops! Something went wrong! :(
ESLint: 8.31.0
TypeError: Cannot read properties of undefined (reading 'type')
Occurred while linting /home/userA/code/projectA/server/util/crypt.js:126
Rule: "jsdoc/valid-types"
at /home/userA/code/projectA/node_modules/eslint-plugin-jsdoc/dist/rules/validTypes.js:99:93
at _traverse (/home/userA/code/projectA/node_modules/jsdoc-type-pratt-parser/dist/index.js:2500:59)
at _traverse (/home/userA/code/projectA/node_modules/jsdoc-type-pratt-parser/dist/index.js:2507:25)
at _traverse (/home/userA/code/projectA/node_modules/jsdoc-type-pratt-parser/dist/index.js:2507:25)
at traverse (/home/userA/code/projectA/node_modules/jsdoc-type-pratt-parser/dist/index.js:2524:9)
at validTypeParsing (/home/userA/code/projectA/node_modules/eslint-plugin-jsdoc/dist/rules/validTypes.js:95:36)
at _default.iterateAllJsdocs (/home/userA/code/projectA/node_modules/eslint-plugin-jsdoc/dist/rules/validTypes.js:194:7)
at iterate (/home/userA/code/projectA/node_modules/eslint-plugin-jsdoc/dist/iterateJsdoc.js:852:3)
at callIterator (/home/userA/code/projectA/node_modules/eslint-plugin-jsdoc/dist/iterateJsdoc.js:953:7)
at *:not(Program) (/home/userA/code/projectA/node_modules/eslint-plugin-jsdoc/dist/iterateJsdoc.js:998:11)
Desired behavior
It would be nice if it could say something like:
The type`Promise<{publicKey, privateKey}>` is not a valid TypeScript type.
With the normal file + line number output.
Alternatives considered
Do not be bad and write invalid types in our code base 😄
The text was updated successfully, but these errors were encountered:
Motivation
Better error messages helps users fix faults.
Current behavior
Having the above (incorrect) TypeScript definition yields this output:
Desired behavior
It would be nice if it could say something like:
With the normal file + line number output.
Alternatives considered
Do not be bad and write invalid types in our code base 😄
The text was updated successfully, but these errors were encountered: