nrwl / precise-commits

:sparkles: Painlessly apply Prettier by only formatting lines you have modified anyway!
MIT License
471 stars 20 forks source link

SyntaxError: await is a reserved word #18

Closed mrsufgi closed 6 years ago

mrsufgi commented 6 years ago

Hey, Very nice work on this package!

I've been trying to integrate precise-commits to our project, It works pretty good but I guess since you only run the formatter on the changed part of a file you lose async block context. this makes working with async/await files impossible.

do you thing this is even fixable?

JamesHenry commented 6 years ago

Hi @mrsufgi, this should be reported on the prettier repo.

Here is a reproduction of the issue in prettier: https://prettier.io/playground/#N4Igxg9gdgLgprEAuEBDAzgTymABAMwFccYBLaAiCACgEpdgAdKXXVAd1VJlwCNUATnQDczAL4gANCAgAHMtHTJQggRHYAFQQiUpUANwikAJlJC8BqMAGs4MAMqyrpKAHNkMAYTjSX6OAIwGpauALaoyPioADb+0gBW6AAeAEKWNnb2qKFwADIucJExcSBOAv4CyOaovJjR0GayAi4wAOomMAAWyAAcAAzSTRD+rZayVU1wFfqF0gJwAI6EpPPBqGERSFGxPiD+oaQeXrvoLq7RcACKhBDwRTvSMDXtxl3IAEyPlqTRZwDCEFC4SqUGgsxAhH8ABUarptiVLG44PYnoEPp8QIjXHAAKJQUxIADMADYxGIgA

JamesHenry commented 6 years ago

I have reported it here: https://github.com/prettier/prettier/issues/4822

JamesHenry commented 6 years ago

This was fixed in prettier