title: Next lint not working on files anywhere other than the ones inside the pages folder
body: <p>I have a FRESHLY installed NextJS app with TypeScript. I am using Next V12, when I run <code>yarn lint</code>, it runs <code>next lint</code> and shows no errors.</p>
  <p><a href="https://i.stack.imgur.com/CG72m.png" rel="noreferrer"><img src="https://i.stack.imgur.com/CG72m.png" alt="No errors whatsoever" /></a></p>
  <p>And now when I add an extra rule in the <code>.eslintrc</code> file like <code>&quot;no-unused-vars&quot;: 2</code> (it means to show an error when there's an un-used variable), and add an un-used variable on purpose in my <code>index.tsx</code> file inside the <code>pages</code> folder so that I can test the linting, it works as expected.</p>
  <p><a href="https://i.stack.imgur.com/acjpI.png" rel="noreferrer"><img src="https://i.stack.imgur.com/acjpI.png" alt="Linting works in pages folder" /></a></p>
  <p>But when I add another folder called <code>hooks</code> and add an <code>index.tsx</code> file with unused variables in it, it doesn't capture the unused variable error in hooks folder, only captures the ones inside <code>pages</code> folder.</p>
  <p>My <code>.eslintrc</code> file looks like this -</p>
  <pre><code>{
      &quot;extends&quot;: &quot;next/core-web-vitals&quot;,
      &quot;rules&quot;: {
          &quot;no-unused-vars&quot;: 2
      }
  }
  </code></pre>
  <p>If anyone faced this issue before and knows what I'm doing wrong, please suggest.</p>