This works great, but I'd like to not have to create each alias individually. Instead, I'd prefer to set up a sort of root alias or wildcard alias like this:
["@/*", "./*"]
or ["@/$", "./$"]
or ["@/", "./"]
etc.
But everything I've tried has broken the imports and given me the "Unable to resolve path to module" error. Is there a correct way to handle this?
I'm using Next.js and trying to setup aliases in my eslint.
My folder structure is:
and I import them like:
import addToCart from '@/utils/addToCart'
Currently I have my eslint import resolver setup like this:
This works great, but I'd like to not have to create each alias individually. Instead, I'd prefer to set up a sort of root alias or wildcard alias like this:
But everything I've tried has broken the imports and given me the "Unable to resolve path to module" error. Is there a correct way to handle this?