We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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:
next-nprogress-bar
useRouter
import { useRouter } from 'next-nprogress-bar'; export function useRenderPageAsComp(pagePathname: string) { const { pathname } = useRouter(); return pathname !== pagePathname; }
depracetd old seeting suggestions.ignoreAutoImports" and extend it to `suggestions.autoImports":
suggestions.ignoreAutoImports"
"suggestions.autoImports": [ { "modules": ["path"], // ignore path, but not path/posix or path/win32 modules, "members": [] } { "modules": ["next-nprogress-bar"], "excludeMembers": ["useRouter"] // will exclude useRouter from next-nprogress-bar }, { "modules": ["@mui/material"], "excludeMembers": ["SxProps"] // will exclude type SxProps from @mui/material }, { "modules": ["@mui/system"], "members": ["SystemCssProperties"], will exclude all other members except for `SystemCssProperties` } ]
Maybe you can get some inspiration from https://eslint.org/docs/latest/rules/no-restricted-imports
The text was updated successfully, but these errors were encountered:
Most of things are available now, but that's a great idea to rework the setting to make it easier to configure
Sorry, something went wrong.
tjx666
No branches or pull requests
I use
next-nprogress-bar
in my next.js project, but ts will sometimes importuseRouter
fromnext-nprogress-bar
which 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
The text was updated successfully, but these errors were encountered: