title: ESLint error: Dependency cycle detected import/no-cycle
body: <h2>The requirement of the project is to separate DOM from logic in different files.</h2>
  <p>Thus, I have these files:</p>
  <p>default.js</p>
  <pre><code>import { submitForm } from './logic'
  
  function displayTaskForm(key) {
    // function create form HTML content with btn submit.
    submitForm(addTaskbtn, key);
    return form;
  }
  
  export { displayTable };
  </code></pre>
  <p>logic.js</p>
  <pre><code>import { displayTable } from './default';
  
  const submitForm = (btn, key) =&gt; {
    // Adds event listener to add input to the table &amp;&amp; local storage
    displayTable(key) // shows the table content including recent input
    return btn;
  }
  
  export { submitForm };
  </code></pre>
  <p>And I have these errors:</p>
  <p>default.js</p>
  <p><code>1:1  error  Dependency cycle detected  import/no-cycle</code></p>
  <p>logic.js</p>
  <p><code>1:1  error  Dependency cycle detected  import/no-cycle</code></p>
  <p>Could you advise how I could solve this issue? the problem is I have to split my DOM from the logic part. I don't see a way to link creating DOM based on if statement results without linking both files with exporting &amp; importing functions to each other.</p>
  <p>Here is the <a href="https://github.com/SarvarKh/to-do-list/tree/structure" rel="nofollow noreferrer">original repository link</a></p>