Skip to content

[no-use-before-define] does not working when using optional chaining #1181

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nodece opened this issue Nov 6, 2019 · 1 comment
Closed
Labels
duplicate This issue or pull request already exists package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin

Comments

@nodece
Copy link

nodece commented Nov 6, 2019

Repro

{
  "rules": {
    "@typescript-eslint/<rule>": ["<setting>"]
  }
}
const rm = this.model.model.get('g')?.get('g')?.rm;

Expected Result
No warning
Actual Result

error  'rm' was used before it was defined                                             @typescript-eslint/no-use-before-define

Additional Info

Versions

package version
@typescript-eslint/eslint-plugin 2.6.1
@typescript-eslint/parser 2.6.1
TypeScript 3.7.0
ESLint 6.6.0
node 10.16.0
yarn 1.19.1
@nodece nodece added package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for team members to take a look labels Nov 6, 2019
@bradzacher bradzacher added duplicate This issue or pull request already exists and removed triage Waiting for team members to take a look labels Nov 6, 2019
@bradzacher
Copy link
Member

duplicate of #1104

Please use the search next time.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Projects
None yet
Development

No branches or pull requests

2 participants