title: Failed to compile: <function name> is not defined no-undef
body: <p>I have a simple functional component in reactJS with arrow function defined inside of it. For some reason it throws a "not defined" error through the function exits. It works in my other repository not sure why it started to throw this error.</p>
  
  <p><strong>My code:</strong></p>
  
  <p><em>Template.js</em></p>
  
  <pre><code>// Dependencies
  import React, { useState } from 'react';
  
  
  function Login(props) { 
  
  
      handleChange = () =&gt; {
          console.log('Hello');
      }
  
  
      return (
          &lt;div&gt;
              &lt;p&gt; Hello &lt;/p&gt;
          &lt;/div&gt;
      );
  };
  
  
  export default Login;
  
  </code></pre>
  
  <p><strong>Error:</strong></p>
  
  <p>./src/screens/Template.js
    Line 8:  'handleChange' is not defined  no-undef</p>
  
  <p>Search for the keywords to learn more about each error.
  This error occurred during the build time and cannot be dismissed.</p>