question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Eslint does not recognize "async", but I have specified "ecmaVersion":"8"

See original GitHub issue

I am not sure if this is a bug or not so I am asking here.

I have specified this in packages.json:

"eslintConfig": { "parserOptions": { "ecmaVersion": "8" } },

I am not sure this is the correct syntax since the docs are a bit unclear to me.

But I get parsing errors on async. What is wrong here?

Ah, and this is during firebase deploy. Maybe there is something special there?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:18 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
platinumazurecommented, Jul 11, 2019

Hi @lborgman, just to be sure, could you try changing “ecmaVersion” to a number? (Not sure if we have an auto-convert somewhere.)

Might also be worth checking the firebase docs to see if there’s a way to get debug output, in case it might show how it invokes ESLint.

1reaction
platinumazurecommented, Jul 12, 2019

@lborgman I think we could maybe accept a PR which would emit a warning of some kind when we’ve seen an .eslintrc.* file, but also see eslintConfig in package.json, to at least state that the eslintConfig is being ignored due to the presence of config files. Would you like to make a separate issue for that change?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Eslint shows error when using "async" in the latest Node ...
Just include the below code in the file .eslintrc.js and it should recognize async/await syntax. parserOptions: { "ecmaVersion": 8, },.
Read more >
eslint/eslint - Gitter
Has anyone reported an issue with .eslintrc.js globals not working in a subdirectory? Recent Issues. Override not working. If the global is defined...
Read more >
Language Options - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >
javascript - Including Async Function Within Firebase Cloud ...
2. I'm not sure that this solves the problem. From my experience it makes eslint work against the wrong target directory. · 2....
Read more >
Node.js - TechSparx
Automating Node.js/JavaScript code quality checks with eslint ... feature allowed it to recognize process and console as global variables that did not need...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found