getTokenBefore dereferences a null, when processing "await import" templated string #12994
Labels
3rd party integration
This is an issue related to a 3rd party consumer
archived due to age
This issue has been archived; please open a new issue for any further discussion
Tell us about your environment
7.0.0-alpha.2
12.16.1
6.13.4
What parser (default, Babel-ESLint, etc.) are you using?
babel-eslint
Please show your full configuration:
Configuration
What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.
What did you expect to happen?
Successful parse. That program runs to completion under Node >= 12 (
node --experimental-modules fail.js
, where filex.js
is the one linerexport const foo = () => 'ok'
).What actually happened? Please include the actual, raw output from ESLint.
eslint
threw an exception, possibly confused by theawait import
syntax. That syntax is supported natively innode
, as well as by Babel ES6.Are you willing to submit a pull request to fix this bug?
uncomfortable with my understanding of what needs to be done.
I hardened the code in
lib/rules/template-curly-spacing.js
to do nothing in case ofnull
, but running again revealed the next error, again due to a null token. At that point I became uncomfortable that I wasn't understanding the bigger picture. So I'm submitting this bug for you guys.The text was updated successfully, but these errors were encountered: