If you want to use experimental features (such as arrows as class methods) you need to use babel-eslint
as a parser. Default parser (Espree) doesn’t support experimental features.
More Related Contents:
- Eslint does not allow static class properties
- How to use arrow functions (public class fields) as class methods?
- How to avoid bind or inline arrow functions inside render method
- Turning off eslint rule for a specific line
- Correct use of arrow functions in React
- ESLint Parsing error: Unexpected token
- Arrow vs classic method in ES6 class
- What is the difference between using constructor vs state = {} to declare state in react component?
- What is the difference between class method vs. class field function vs. class field arrow function?
- ESLint with React gives `no-unused-vars` errors
- How do I make a “public static field” in an ES6 class?
- Global variables in Javascript and ESLint
- What are “class fields” in JavaScript?
- React eslint error missing in props validation
- Array destructuring in JavaScript
- VSCode Linter ES6 ES7 Babel linter
- How to avoid no-param-reassign when setting a property on a DOM object
- Omit property variable when using object destructuring
- How to get access to private field via square brackets in JavaScript
- Declare a class property outside of a class method
- ESLint not working in VS Code?
- ESLint’s “no-undef” rule is calling my use of Underscore an undefined variable
- Can I set a private class field using a variable as identifier? How?
- JSX not allowed in files with extension ‘ .js’ with eslint-config-airbnb
- Unnecessary ‘else’ after ‘return’. (No-else-return)
- ESLint: “error Parsing error: The keyword ‘const’ is reserved”
- How does this object method definition work without the “function” keyword?
- Javascript if statements not working [duplicate]
- Custom browser actions in Protractor
- Disable zooming of the page in desktop web browsers using Javascript/Jquery [duplicate]