Eslint-plugin-jsdoc: TypeError: Cannot read property 'type' of null

Created on 6 May 2020  路  7Comments  路  Source: gajus/eslint-plugin-jsdoc

Looks like there is a bug in v24.0.4.
Note that v24.0.2 is working fine.

In eslint-plugin-jsdoc/dist/eslint/getJSDocComment.js:162:29

https://github.com/gajus/eslint-plugin-jsdoc/blob/fdf129bbb4c4badd5cad0d98f157c0bf46e8da34/src/eslint/getJSDocComment.js#L158

Occurred while linting /Users/me/repo/src/file.js:24
    at getReducedASTNode (/Users/me/repo/node_modules/eslint-plugin-jsdoc/dist/eslint/getJSDocComment.js:162:29)
    at *:not(Program) (/Users/me/repo/node_modules/eslint-plugin-jsdoc/dist/iterateJsdoc.js:553:70)
    at /Users/me/repo/node_modules/eslint/lib/linter/safe-emitter.js:45:58
    at Array.forEach (<anonymous>)
    at Object.emit (/Users/me/repo/node_modules/eslint/lib/linter/safe-emitter.js:45:38)
    at NodeEventGenerator.applySelector (/Users/me/repo/node_modules/eslint/lib/linter/node-event-generator.js:254:26)
    at NodeEventGenerator.applySelectors (/Users/me/repo/node_modules/eslint/lib/linter/node-event-generator.js:281:22)
    at NodeEventGenerator.enterNode (/Users/me/repo/node_modules/eslint/lib/linter/node-event-generator.js:297:14)
    at CodePathAnalyzer.enterNode (/Users/me/repo/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:634:23)
    at /Users/me/repo/node_modules/eslint/lib/linter/linter.js:936:32

Node.js v12.16.2 and all dependencies up to date.

released

Most helpful comment

:tada: This issue has been resolved in version 24.0.5 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

All 7 comments

Thank you, but what is the source code for src/file.js? Can you boil it down to a minimal case? It should be related to a function expression of some kind and its ancestors--nothing else. I know how to guard against it, but should have coverage.

I am currently facing the exact same issue on a _TypeScript_ file and I was going there to open a new issue.
24.0.0.2 is working, but 24.0.0.3 and .4 are not.
I have to work on a file to reproduce this issue, as I cannot share the ones I am working on.

I've replicated and isolated the issue and should have a fix out shortly.

:tada: This issue has been resolved in version 24.0.5 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

I confirm the new release fixes the bug, thanks! 馃槈

Just a heads up that I found a further fix was needed relative to a regression in 24.0.3, so you should upgrade to 24.0.6. Sorry for the trouble!

:tada: This issue has been resolved in version 25.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lgaticaq picture lgaticaq  路  6Comments

rasenplanscher picture rasenplanscher  路  3Comments

MaxMilton picture MaxMilton  路  4Comments

ibbignerd picture ibbignerd  路  3Comments

ZacBrownBand picture ZacBrownBand  路  6Comments