Unknown node type TSAsExpression for no-nested-subscribe
See original GitHub issueHello,
Using eslint@6.5.1
and eslint-plugin-rxjs@0.0.1-beta.4
I recently added the rxjs/no-nested-subscribe rule with default config, and it makes ESlint crash with the following error:
Error: Unknown node type TSAsExpression.
The config I’m using is :
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module",
"project": "./tsconfig.json"
},
// ...
"rules": {
// ...
"rxjs/no-nested-subscribe": "error",
// ...
}
If I remove this one rule, everything is working fine.
On the source code part, indeed there is a nested subscribe, which is when it’s failing.
I have yet to get a clue about why and how it is breaking.
Issue Analytics
- State:
- Created 4 years ago
- Comments:14 (9 by maintainers)
Top Results From Across the Web
babel/types
AST Node AssignmentPattern shape: left : Identifier | ObjectPattern | ArrayPattern | MemberExpression | TSAsExpression | TSTypeAssertion | TSNonNullExpression ( ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@dpraul This repo includes a test - taken from this issue - that passes with the latest versions installed:
https://github.com/cartant/eslint-plugin-rxjs/blob/a6f4e5ec25a70f1a68b3bf7acf4ba7a477feacba/tests/rules/no-nested-subscribe.ts#L43-L52
You would have to provide a minimal reproduction for this to be taken further.
Also, IMO, maintainers prefer to have new issues opened rather than to have people comment on closed issues. In future, I would recommend your not commenting on closed issues and, instead, opening a new issue from within which you can reference the issue upon which would would otherwise have commented.
@cartant I’m experiencing this same issue on
0.0.2-beta.16
with@typescript-eslint
2.21.0
. The example code provided in https://github.com/cartant/eslint-plugin-rxjs/issues/38#issuecomment-546292889 triggers the issue just the same as it did before.