Skip to content
This repository has been archived by the owner on Feb 21, 2022. It is now read-only.

TypeError: Cannot read property 'kind' of undefined #75

Closed
RomkeVdMeulen opened this issue Apr 7, 2016 · 4 comments
Closed

TypeError: Cannot read property 'kind' of undefined #75

RomkeVdMeulen opened this issue Apr 7, 2016 · 4 comments
Labels

Comments

@RomkeVdMeulen
Copy link

I'm getting this error:

projectdir/node_modules/tslint-eslint-rules/dist/rules/noInnerDeclarationsRule.js:59
            kind: ancestor.kind,
                          ^

TypeError: Cannot read property 'kind' of undefined
    at NoInnerDeclarationsWalker.nearestBody (projectdir/node_modules/tslint-eslint-rules/dist/rules/noInnerDeclarationsRule.js:59:27)
    at NoInnerDeclarationsWalker.validateInnerDeclaration (projectdir/node_modules/tslint-eslint-rules/dist/rules/noInnerDeclarationsRule.js:43:25)
    at NoInnerDeclarationsWalker.visitVariableStatement (projectdir/node_modules/tslint-eslint-rules/dist/rules/noInnerDeclarationsRule.js:38:18)
    at NoInnerDeclarationsWalker.SyntaxWalker.visitNode (projectdir/node_modules/tslint/lib/language/walker/syntaxWalker.js:426:22)
    at projectdir/node_modules/tslint/lib/language/walker/syntaxWalker.js:441:63
    at visitEachNode (projectdir/node_modules/typescript/lib/typescript.js:7252:30)
    at Object.forEachChild (projectdir/node_modules/typescript/lib/typescript.js:7409:24)
    at NoInnerDeclarationsWalker.SyntaxWalker.walkChildren (projectdir/node_modules/tslint/lib/language/walker/syntaxWalker.js:441:12)
    at NoInnerDeclarationsWalker.SyntaxWalker.visitSourceFile (projectdir/node_modules/tslint/lib/language/walker/syntaxWalker.js:181:14)
    at NoInnerDeclarationsWalker.SyntaxWalker.visitNode (projectdir/node_modules/tslint/lib/language/walker/syntaxWalker.js:396:22)

Maybe related to palantir/tslint#832 but I'm not sure since that's supposed to be fixed. Using tslint 3.7.1, tslint-eslint-rules 1.0.1, typescript 1.8.9.

@buzinas
Copy link
Owner

buzinas commented Apr 7, 2016

Can you update tslint-eslint-rules to the last version, please?

Not sure if it will solve the problem, but if it does, better :)

@buzinas
Copy link
Owner

buzinas commented Apr 7, 2016

Hm, looking at the logic, it seems to be broken indeed. Can you please show me what's the code that is generating this error, please?

@RomkeVdMeulen
Copy link
Author

I can't tell which code this error is generated on: the error occurs before anything is reported.

Updating to tslint-eslint-rules 1.2.0 fixes this. 😄

@buzinas
Copy link
Owner

buzinas commented Apr 7, 2016

Weird.

But I'm happy that updating it fixed your issue!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants