async parsing rules are broken
See original GitHub issueTell us about your environment
- ESLint Version: 3.6.0
- Node Version: 6.6
- npm Version: whatever it comes with
What parser (default, Babel-ESLint, etc.) are you using? default
Please show your full configuration:
echo 'var foo = { async: 3 };' | eslint --no-eslintrc --stdin --parser-options='ecmaVersion:2017'
What did you do? Please include the actual source code causing the issue.
echo 'var foo = { async: 3 };' | eslint --no-eslintrc --stdin --parser-options='ecmaVersion:2017'
What did you expect to happen? No error.
What actually happened? Please include the actual, raw output from ESLint.
<text>
1:18 error Parsing error: Unexpected token :
✖ 1 problem (1 error, 0 warnings)
async
is not a keyword, so it should be allowed anywhere.
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (7 by maintainers)
Top Results From Across the Web
Making parser or printer async · Issue #4459 · prettier ... - GitHub
If anyone is interested in caching parse() results in another Prettier plugin, I'm happy to extract the algorithm into an npm module.
Read more >Building the DOM faster: speculative parsing, async, defer and ...
We'll break down how defer and async work and how you can ... Because CSS rules can override each other, the browser engine...
Read more >a non-blocking alternative to JSON.parse to keep web UIs ...
That doesn't solve the issue of JSON.parse() being blocking. Async operations aren't meant to be used as a wrapper for synchronous ones, it's ......
Read more >Put back the ability to parse files where async/await aren't ...
I was made aware [1] that the addition of the "cf_feature_version" field broke the backwards compatibility of the "PyRun_StringFlags()" function ...
Read more >Problem with parsing eslint for async function - Stack Overflow
Module build failed: 19 : redirect_uri: redirectUri, 20 : }); 21 : 22 : 23 : async function getAsyncAuth() { ^ Unexpected token...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I sent a PR to fix.
Acorn parses this fine and espree reproduces the issue when used directly, so I think it’s definitely an espree issue. Unfortunately, that’s all I have time for at this point, so someone else feel free to jump on it.
@mysticatea I reproduced on espree master but had no trouble when using espree’s acorn dependency (and I just cloned espree and
npm install
’d five minutes ago), so I’m pretty sure there’s an espree problem. (EDIT: And I just confirmed that espree pulled in acorn 4.0.3. So there’s something wrong with espree for sure)