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.

Unknown node type TSAsExpression for no-nested-subscribe

See original GitHub issue

Hello,

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:closed
  • Created 4 years ago
  • Comments:14 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
cartantcommented, Mar 2, 2020

@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.

0reactions
dpraulcommented, Mar 2, 2020

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

babel/types
AST Node AssignmentPattern shape: left : Identifier | ObjectPattern | ArrayPattern | MemberExpression | TSAsExpression | TSTypeAssertion | TSNonNullExpression ( ...
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