I've been working on a project using Next.js and Typescript. My imports look like this:
import Component from "/components/Component/Component";
, with the root directory being specified as /src
. This setup works fine in Next.js, but ESLint keeps throwing errors specifically for the line Cannot find module '/path/to/component' or its corresponding type declarations. ts(2307)
. It's frustrating because it makes my project appear to have numerous errors when most of them stem from this one issue.
Is there a way to instruct ESLint to ignore this specific typescript error (TS2307)?
Any help would be greatly appreciated!