Parsing error: Unexpected character Default
See original GitHub issueTell us about your environment
- ESLint Version: 5.15.3
- Node Version: 8.11.3
- npm Version: 6.5.0
What parser (default, Babel-ESLint, etc.) are you using? babel-eslint Please show your full configuration:
Configuration
{
"env": {
"browser": true,
"commonjs": true,
"es6": true
},
"extends": ["eslint:recommended", "plugin:vue/recommended", "plugin:vue/strongly-recommended", "plugin:vue/essential"],
"parserOptions": {
"parser": "babel-eslint",
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": [
"vue"
],
"rules": {
"indent": [
0,
2,
{ "SwitchCase": 1 }
],
"no-extra-semi": "warn",
"no-unused-vars": "warn",
"no-trailing-spaces": 0,
"no-case-declarations": "warn",
"no-unreachable": "warn",
"no-multiple-empty-lines": 0,
"prefer-const": 0,
"space-infix-ops": "warn",
"camelcase": 0,
"no-console": 0,
"linebreak-style": 0,
"quotes": 0,
"semi": 0,
"vue/require-prop-types": 0,
"vue/no-reserved-keys": 0,
"vue/order-in-components": 0,
"vue/require-default-prop": 0,
"vue/return-in-computed-property": 0
}
}
What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.
function SimpleEvent(){
this._isPreventDefault = false;
}
SimpleEvent.prototype.preventDefault = function(){
}
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Parsing error: Unexpected character '#' while declaring ...
When using '#' to declare a private member in a javascript class, eslint throws an error Parsing error: Unexpected character '#' .
Read more >Parsing error: Unexpected character '#' · Issue #1542
I have tried writing // eslint-disable-next-line on the line before the line in error. I have also tried writing // eslint-disable-line at the ......
Read more >Please help me fix this error Parse error: syntax ...
Please help me fix this error Parse error: syntax error, unexpected character · 1. Download the latest version of WordPress CMS. · 2....
Read more >SyntaxError: JSON.parse: bad parsing - JavaScript | MDN
JSON.parse() parses a string as JSON. This string has to be valid JSON and will throw this error if incorrect syntax was encountered....
Read more >unexpected character '`', eslint parsing error
eslintrc is no longer enough for particular situations, such as using. 1, this was fine export default class Root extends React. Uncaught SyntaxError: ......
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
thanks for the demo. the code includes a
\u200b
(zero width space) somehow:it is invisible, so the reported message is really misleading. you can file an issue in acorn repo to improve the message. I would recommended to say something like
unexpected '\u200b'
.You are right. np