title: How to avoid Flow-type error on ES6 arrow function
body: <p>I am having trouble resolving a Flow-type warning </p>
  
  <p>When this code block is checked</p>
  
  <pre><code>export const login = (email: string, password: string) =&gt; ({
    type: types.LOGIN,
    responseTypes: [types.LOGIN_SUCCESS, types.LOGIN_FAILURE],
    promise: (client: Client) =&gt; client.post('/auth/sign_in', { email, password }),
  });
  </code></pre>
  
  <p>I receive the warning</p>
  
  <blockquote>
    <p>error  Unexpected parentheses around single function argument having a
    body with no curly braces  arrow-parens</p>
  </blockquote>
  
  <p>However, when I remove the parenthesis around <code>(client: Client)</code>, I receive the error </p>
  
  <blockquote>
    <p>Module build failed: SyntaxError: Unexpected token</p>
  </blockquote>
  
  <p>at the colon after <code>client</code>.</p>
  
  <p>Changing the function to the following</p>
  
  <pre><code>export const login = (email: string, password: string) =&gt; ({
    type: types.LOGIN,
    responseTypes: [types.LOGIN_SUCCESS, types.LOGIN_FAILURE],
    promise: (client: Client) =&gt; { return client.post('/auth/sign_in', { email, password }); },
  });
  </code></pre>
  
  <p>the returns the following warning:</p>
  
  <blockquote>
    <p>error  Unexpected block statement surrounding arrow body                                          arrow-body-style</p>
  </blockquote>
  
  <p>I'm a little confused at to what the correct syntax would be to fix this warning. Thanks.</p>