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

fix(typescript-estree): parsing error for await in non-async func #988

Merged

Conversation

kaicataldo
Copy link
Member

@kaicataldo kaicataldo commented Sep 18, 2019

Fixes #987

This PR adds a parsing error for when await is used in a non-async function, which matches both espree and babel-eslint's behavior. Is this something the rest of the team agrees should be done? Is this the correct way to solve this?

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @kaicataldo!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day.

@bradzacher bradzacher added the bug Something isn't working label Sep 18, 2019
@codecov
Copy link

codecov bot commented Sep 18, 2019

Codecov Report

Merging #988 into master will not change coverage.
The diff coverage is 100%.

@@           Coverage Diff           @@
##           master     #988   +/-   ##
=======================================
  Coverage   94.13%   94.13%           
=======================================
  Files         115      115           
  Lines        5016     5016           
  Branches     1403     1403           
=======================================
  Hits         4722     4722           
  Misses        166      166           
  Partials      128      128
Impacted Files Coverage Δ
...escript-estree/src/semantic-or-syntactic-errors.ts 87.5% <ø> (ø)
packages/typescript-estree/src/parser.ts 93.05% <100%> (ø) ⬆️

@bradzacher bradzacher changed the title fix(typescript-estree): parsing error for await in non-async function fix(typescript-estree): parsing error for await in non-async func Sep 19, 2019
@bradzacher bradzacher merged commit 19abbe0 into typescript-eslint:master Sep 19, 2019
@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
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[typescript-estree]: await in non-async function parses without error
3 participants