I use next-nprogress-bar in my next.js project, but ts will sometimes import useRouter from next-nprogress-bar which is not my expected:
import { useRouter } from 'next-nprogress-bar';
export function useRenderPageAsComp(pagePathname: string) {
const { pathname } = useRouter();
return pathname !== pagePathname;
}
Solution
depracetd old seeting suggestions.ignoreAutoImports" and extend it to `suggestions.autoImports":
Maybe you can get some inspiration from https://eslint.org/docs/latest/rules/no-restricted-imports
I use
next-nprogress-barin my next.js project, but ts will sometimes importuseRouterfromnext-nprogress-barwhich is not my expected:Solution
depracetd old seeting
suggestions.ignoreAutoImports"and extend it to `suggestions.autoImports":Maybe you can get some inspiration from https://eslint.org/docs/latest/rules/no-restricted-imports