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
However, I've tried out the rules in a couple of projects, and I've consistently run into the following error during linting:
The 'rxjs-finnish' rule threw an error in 'M:/Git/_public/rxjs-finnish-rule-issue/file.ts':
TypeError: Cannot read property 'name' of undefined
at Walker.validateNode (M:\Git\_public\rxjs-finnish-rule-issue\node_modules\rxjs-tslint-rules\dist\rules\rxjsFinnishRule.js:169:49)
at Walker.visitPropertyDeclaration (M:\Git\_public\rxjs-finnish-rule-issue\node_modules\rxjs-tslint-rules\dist\rules\rxjsFinnishRule.js:130:18)
at Walker.SyntaxWalker.visitNode (M:\Git\_public\rxjs-finnish-rule-issue\node_modules\tslint\lib\language\walker\syntaxWalker.js:467:22)
at M:\Git\_public\rxjs-finnish-rule-issue\node_modules\tslint\lib\language\walker\syntaxWalker.js:535:63
at visitNodes (M:\Git\_public\rxjs-finnish-rule-issue\node_modules\typescript\lib\typescript.js:14006:30)
at Object.forEachChild (M:\Git\_public\rxjs-finnish-rule-issue\node_modules\typescript\lib\typescript.js:14293:21)
at Walker.SyntaxWalker.walkChildren (M:\Git\_public\rxjs-finnish-rule-issue\node_modules\tslint\lib\language\walker\syntaxWalker.js:535:12)
at Walker.SyntaxWalker.visitClassDeclaration (M:\Git\_public\rxjs-finnish-rule-issue\node_modules\tslint\lib\language\walker\syntaxWalker.js:63:14)
at Walker.SyntaxWalker.visitNode (M:\Git\_public\rxjs-finnish-rule-issue\node_modules\tslint\lib\language\walker\syntaxWalker.js:314:22)
at M:\Git\_public\rxjs-finnish-rule-issue\node_modules\tslint\lib\language\walker\syntaxWalker.js:535:63
I've narrowed it down to being caused by the declaration of an optional property (which I use extensively with strictNullChecks enabled):
myOptionalProperty?: Subject<number> = new Subject<number>();
Hey, I'm liking the package!
However, I've tried out the rules in a couple of projects, and I've consistently run into the following error during linting:
I've narrowed it down to being caused by the declaration of an optional property (which I use extensively with
strictNullChecks
enabled):myOptionalProperty?: Subject<number> = new Subject<number>();
I've set up a minimal test repo for evaluation:
https://github.com/zbream/rxjs-finnish-rule-issue
You'll notice that if you comment out
myOptionalProperty
, everything works as expected. Also, nono-unused-variable
in this project.The text was updated successfully, but these errors were encountered: