Unexpected Identifier
See original GitHub issueI am using eslint extension along with prettier for vscode.
In my react components, when I type a function name, as I’m typing, the error image from the 2nd screenshot constantly pops up. So for n letters I type, the popup shows up n times.
handleChange() {}
Does not happen if all functions are written like the above.
handleChange = () => {}
Error constantly pops up if I have functions written in this format. (but I want to write it in this format)
My eslintrc file setup like the following
{
"extends": [
"standard",
"plugin:flowtype/recommended",
"plugin:react/recommended",
"prettier",
"prettier/flowtype",
"prettier/react",
"prettier/standard"
],
"plugins": [
"flowtype",
"react",
"prettier",
"standard"
],
"parserOptions": {
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"env": {
"es6": true,
"node": true
},
"rules": {
"prettier/prettier": "error"
}
}
Any idea what could be wrong?
Thanks
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Unexpected Identifier in Chrome's Javascript console
I got this error Unexpected identifier because of a missing semi-colon ; at the end of a line. Anyone wandering here for other...
Read more >Unexpected identifier Error in JavaScript | bobbyhadz
The "Uncaught SyntaxError: Unexpected identifier" error occurs for 2 main reasons: · You can paste your code into an online Syntax Validator.
Read more >How To Solve The Unexpected Identifier Error in JavaScript
How do you fix this Unexpected identifier error in your code? The simplest thing you can do to find a specific error like...
Read more >A Common Cause of "Uncaught syntax error - Techstacker
Uncaught SyntaxError: Unexpected identifier. One of the most common reasons is that you're trying to mutate (change) a const variable.
Read more >SyntaxError: Unexpected identifier - Codecademy
SyntaxError: Unexpected identifier. I'm trying to create a program which asks the user what they're favorite Big Ten team is, checks if that...
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 tries to running eslint from the command line and here is what I get:
You need to put
too
in the file where you indicated and then run eslint from the terminal (e.g..\node_modules\.bin\eslint index.js
. This looks like a ESLint problem to me. Can you please report it there.I am having an issue with this as well. I would love it if I could just turn off notifications from vscode-eslint. Is there any way to do that? I still want the squiggly lines, just not the popup notifications.