[perf] disallow async/await
async/await is already disallowed by this guide due to the regenerator-runtime requirement; however, once that is obviated, we'll be allowing it.
however I'm not seeing it in the guide, am I missing something?
It's handled by the linter.
no-restricted-syntax? I was not seeing it either. (I am using eslint-config-airbnb, it doesn't report the usage)
oh hm, maybe we haven't restricted it explicitly just yet. However, since babel-preset-airbnb doesn't transpile it, and since we use the default parser, it shouldn't parse at all.
If you're using babel-eslint, you've already deviated from the guide.
async/await has been included in ES spec. maybe we can add it in the config.
I can make a PR if no objection. :)
That's been true for over a year; there's a number of things in the spec that we don't support because the default eslint parser doesn't yet parse them.
Sure, a PR to add a section to the guide about async/await would be fine.
@ljharb Is async/await still discouraged? I can use it without babel (hence no increase in bundle size). It's not supported in IE but Promise isn't either.
@riwu but Promise is shimmable/polyfillable, and you should be shimming in your app regardless - async/await is not.