Eslint does not recognize "async", but I have specified "ecmaVersion":"8"
See original GitHub issueI 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:
- Created 4 years ago
- Comments:18 (9 by maintainers)
Top 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 >
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 Free
Top 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
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.
@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 seeeslintConfig
inpackage.json
, to at least state that theeslintConfig
is being ignored due to the presence of config files. Would you like to make a separate issue for that change?