Closed jbrunton closed 9 months ago
Update: after further testing I realised that eslint-import-resolver-typescript
appears to support subpath patterns.
I wonder if there's a good solution for JS only projects. However, I'm using TypeScript, so this meets my own needs. I'll close this issue.
@jbrunton , for JS projects import aliases can also be defined using the configuration of import/resolver
. I'm glad you like the plugin, by the way 😃
Big fan of this plugin. I've been using it in various projects for a while.
Is your feature request related to a problem? Please describe.
In a new project I'm using Node import subpath patterns to organise my imports. For example, in my
package.json
I have the following:Describe the solution you'd like
I would like to be able to import code using subpath patterns (e.g.
import { whatever } from "#usecases/whatever";
).Instead, I get
Importing ignored files is not allowed
.Describe alternatives you've considered
Usually I use TypeScript path aliases to help organise my code, which worked with
eslint-plugin-boundaries
. However, path aliases don't work withts-node
and ES Modules.Additional context
Sample repo to reproduce here: https://github.com/jbrunton/eslint-plugin-boundaries-import-subpaths.
It's possible there's a solution to this but I didn't see anything in the docs.
Assuming I've not missed anything obvious and this requires a code change, I'd be happy to contribute if there is a reasonable solution to this, but I'd need some guidance.