Rule: "@typescript-eslint/prefer-optional-chain" fails with "Error: Unexpected member object type: TSNonNullExpression" #5553
Labels
accepting prs
Go ahead, send a pull request that resolves this issue
bug
Something isn't working
package: eslint-plugin
Issues related to @typescript-eslint/eslint-plugin
Before You File a Bug Report Please Confirm You Have Done The Following...
Issue Description
Latest version fails to process the MikroORM codebase. You can see the failed build in CI here:
https://github.com/mikro-orm/mikro-orm/runs/8041169217?check_suite_focus=true
There are more dependency updates, but the error was there even before, when it was only about eslint - I did verify it locally too, by only updating eslint.
The line where it fails is here:
https://github.com/mikro-orm/mikro-orm/blob/40f725e851d0217fb1a3022492f72bcdad331e26/packages/core/src/EntityManager.ts#L1104
Reproduction Repository Link
https://github.com/mikro-orm/mikro-orm
Repro Steps
yarn install
yarn lint
Versions
@typescript-eslint/eslint-plugin
5.35.1
@typescript-eslint/parser
5.35.1
@typescript-eslint/scope-manager
5.35.1
@typescript-eslint/typescript-estree
5.35.1
@typescript-eslint/type-utils
5.35.1
@typescript-eslint/utils
5.35.1
TypeScript
4.7
&4.8
ESLint
8.22.0
node
16.16
&18.7
The text was updated successfully, but these errors were encountered: