question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Report errors (and quickfixes) for incorrect JSDoc

See original GitHub issue

TypeScript Version: nightly (2.4.0-dev.20170515)

Code

/**
 * @param abcdeg A parameter
 */
function f(abcdefg: number) {
    abcdeg;
}

Expected behavior:

Can fix spelling for either abcdeg.

Actual behavior:

Does not work in jsdoc.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:3
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
andy-mscommented, Jul 3, 2018

@brettz9 Enable "checkJs": true inside compilerOptions in your tsconfig.json and you should get an error if a @return tag is incorrect.

/** @return {number} */
function g() { return ""; } // Error

Enable "noImplicitAny": true (or better, "strict": true) and you will get an error if a @param tag is missing.

function f(x) {} // Error, 'x' is implicitly 'any'
0reactions
brettz9commented, Jul 3, 2018

Might there be optional report of missing JSDoc @param and @return?

And how about detection of a mismatch between actual return and @return/@returns?

Read more comments on GitHub >

github_iconTop Results From Across the Web

JavaScript linters | WebStorm Documentation - JetBrains
View problems and apply quick-fixes in the editor. In the editor, hover the mouse pointer over the highlighted problem.
Read more >
JavaScript Type Linting - Medium
As you type your JavaScript, TypeScript will analyze the types and report any errors it finds. Since this happens live, there is no...
Read more >
About JSDoc plugins
Reporting Errors. If your plugin needs to report an error, use one of the following methods in the jsdoc/util/logger module:.
Read more >
npm install error Invalid Package: expected taffydb but found ...
It would appear that this latest commit in the taffydb-jsdoc fork has broken it: ...
Read more >
The starting point for learning TypeScript
TypeScript Documentation. Get Started. Quick introductions based on your background or preference. TS for the New Programmer · TypeScript for JS ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found