Provides elm-review rules to enforce boundaries in projects that vendor code.
-
NoInternalImports- Reports boundary violations for projects with vendored code..
module ReviewConfig exposing (config)
import NoInternalImports
import Review.Rule exposing (Rule)
config : List Rule
config =
[ NoInternalImports.rule []
]You must pass as parameter all the source-directories that are outside your project's root (that is, the ones that start with .. or /).
Package boundaries are automatically detected by searching for elm.json files one level up from the directories ending with /src.
The packages don't need to be published, so you can separate a larger app into "packages" by simply creating the necessary elm.json files. The rule extracts the exposed modules from there and prevents importing of anything else.
You can try the example configuration above out by running the following command:
elm-review --template miniBill/elm-review-no-internal-imports/example