eslint 2.10.1 - Parsing error: Unexpected token
See original GitHub issueWhat version of ESLint are you using? 2.10.1
What parser (default, Babel-ESLint, etc.) are you using? babel-eslint
Please show your full configuration:
module.exports = {
"extends": "airbnb",
"parser": "babel-eslint",
}
What did you do? Please include the actual source code causing the issue.
I have a sample demonstrating the issue at: https://github.com/michael-wolfenden/eslint-2-10-1-issue
but running eslint via webpack with:
export class Counter {
static initialCount = 0;
}
generates the error:
C:\Dev\eslint-issue\Counter.js
2:23 error Parsing error: Unexpected token =
What did you expect to happen? No errors
What actually happened? Please include the actual, raw output from ESLint.
C:\Dev\eslint-issue\Counter.js
2:23 error Parsing error: Unexpected token =
Addition information
The issue first occurred with 2.10.0
so at first I assumed it was the same issue as #6158 , however upgrading to 2.10.1
didn’t fix the issue. It appears as though the eslint babel parser isn’t kicking in.
Another thing to note is that the issue only occurs when running eslint via webpack.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:5
- Comments:11 (6 by maintainers)
Top GitHub Comments
Any ETA on the “fix” release?
Thanks for the comments everyone - we are investigating this issue as quickly as we can. There’s some disagreement over the correct approach to fixing the problem, so we’re working to resolve that. If you are stuck in the meantime, please consider downgrading to ESLint v1.9.0 until resolved.
If you want updates, please use the “Subscribe” button instead of leaving a comment (which trigger notifications that can distract us as we’re working).