title: using arrow functions inside class and using it in the constructor - nodejs
body: <p>I have a class called the user, where I have a method called getDetails. I am using the arrow function for the method.</p>
  
  <p>the problem is when i use arrow function eslint shows error, for the = (equal) so I have added the babel-eslint. Now the eslint error is not showing but when I run the code it is showing </p>
  
  <p><strong>SyntaxError: Unexpected token =</strong></p>
  
  <p>// index.js</p>
  
  <pre><code>class User{
    constructor(){
      this.users = this.getUsers()
    }
  
    getUsers = () =&gt; {
      return ["test1", "test2"]
    }
  }
  </code></pre>
  
  <p>// eslintrc</p>
  
  <pre><code>{
    "extends": "airbnb-base",
    "parser": "babel-eslint",
    "env": {
      "es6": true,
      "jest": true
    },
   .........
  ..........
  }
  </code></pre>
  
  <p>I am using node version of 8.11.1. Any help appreciated.</p>