Skip to content
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

Use @typescript-eslint/no-unused-expressions to support optional chaining #8003

Merged
merged 1 commit into from
Nov 20, 2019
Merged

Use @typescript-eslint/no-unused-expressions to support optional chaining #8003

merged 1 commit into from
Nov 20, 2019

Conversation

maxdavidson
Copy link
Contributor

Eslint's no-unused-expressions rule doesn't support the new optional chaining syntax and yields false positives. Typescript-eslints's equivalent was recently updated to support it, so use it instead.

This fix only affects TypeScript, so in order to make it work for plain JavaScript we'd have to wait for official Eslint support or perhaps add another plugin like this one.

image

@ianschmitz ianschmitz added this to the 3.3 milestone Nov 20, 2019
@ianschmitz ianschmitz merged commit 4604c5e into facebook:master Nov 20, 2019
@ianschmitz
Copy link
Contributor

Thanks!

@lock lock bot locked and limited conversation to collaborators Nov 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants