-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
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
Nested modules #171
Comments
Hey, nested modules work. Could you provide a little bit of more context?
|
Hey, chiming in on @KvikullSigurdur's behalf, we were hoping for Expanding on the example, we could have the following:
We were expecting // in /Student/index.ts
import { getLanguageClasses } from "../University/moduleIndex.ts"; but it seems to also allow // in /Student/index.ts
import { getLanguageClasses } from "../University/LanguagesDepartment/moduleIndex.ts"; But we also want to be able to import from a siblings // in /University/MathsDepartment/mathDepartmentLogic.ts
import { getLanguageClasses } from "../LanguagesDepartment/moduleIndex.ts"; |
Love the idea and would love to implement it in my projects.
I am having some trouble with nested modules. Take for example the file structure:
(I am using moduleIndex.ts as my barrel files since the project already includes a lot of index.ts files that are not respected as a module boundary).
In this case I want the University module to encapsulate everything underneath it but since there is a lot there I also want to organise that into further sub modules.
Sheriff does not display any error for statements like
import * from "./University/Department/moduleIndex"
. As long as the import statement points to the moduleIndex at the bottom.Is this the intended functionality? Or have I somehow managed to misconfigure sheriff?
The text was updated successfully, but these errors were encountered: