title: Create-React-App failed to compile | Import/First Error
body: <p>I'm currently using Create-React-App for my personal site. I keep getting the following errors every time I run it:</p>
  
  <pre><code>./src/~/react-router-dom/es/index.js
   Line 3:   Import in body of module; reorder to top  import/first
   Line 5:   Import in body of module; reorder to top  import/first
   Line 7:   Import in body of module; reorder to top  import/first
   Line 9:   Import in body of module; reorder to top  import/first
   Line 11:  Import in body of module; reorder to top  import/first
   Line 13:  Import in body of module; reorder to top  import/first
   Line 15:  Import in body of module; reorder to top  import/first
   Line 17:  Import in body of module; reorder to top  import/first
   Line 19:  Import in body of module; reorder to top  import/first
   Line 21:  Import in body of module; reorder to top  import/first
   Line 23:  Import in body of module; reorder to top  import/first
   Line 25:  Import in body of module; reorder to top  import/first
  </code></pre>
  
  <p>I definitely feel like I'm missing something super small but I'm having trouble figuring it out. I tried Googling the error keyword 'import/first' and it's leading me to think it's an ESLint issue. Please let me know if you see any problem in my import order. I've tried different import orders, but nothing seems to get rid of the error. </p>
  
  <pre><code>import React from 'react';
  import ReactDOM from 'react-dom';
  import { createBrowserHistory } from 'history';
  import { Router, Route, Redirect, Switch } from 'react-router-dom';
  import './index.css'; 
  import App from './App.js';
  import Home from './home.js';
  import About from './about.js';
  import Contact from './contact.js';
  import NotFound from './404.js';
  
  import registerServiceWorker from './registerServiceWorker';
  
  const history = createBrowserHistory();
  
  ReactDOM.render(
      &lt;Router history={history}&gt;
          &lt;App&gt;
              &lt;Switch&gt;
                  &lt;Route exact path="/" component= {Home} /&gt;
                  &lt;Route path="/about" component= {About} /&gt;
                  &lt;Route path="/contact" component= {Contact} /&gt;
                  &lt;Route path="/404" component= {NotFound} /&gt;
                  &lt;Redirect to= "/404" /&gt;
              &lt;/Switch&gt;
          &lt;/App&gt;
      &lt;/Router&gt;,
      document.getElementById('root')
  );
  registerServiceWorker();
  </code></pre>