kress95/elm-review-indirect-internal/1.0.0

Rerouted (archive, verified). The original repository is gone. This copy comes from an archive (Software Heritage). The Lamdera package server serves a copy recovered from swh:1:rev:7cee1b9190c09f7d83517221e36421a018c5f091 (Software Heritage, origin https://github.com/kress95/elm-review-indirect-internal).

What we checked: Software Heritage archived tag 1.0.0 of github.com/kress95/elm-review-indirect-internal at commit 7cee1b9190c0; its commit 7cee1b9190c0 is from 2021-03-06 23:01 UTC, before the version was published (2021-03-06 23:02 UTC); elm.json is byte-identical to package.elm-lang.org's; the exposed modules match docs.json; the zip is our own, made from Software Heritage's copy of the files Elm uses, so its SHA-1 is not the published one.

The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.

Details · package.elm-lang.org's zip: https://github.com/kress95/elm-review-indirect-internal/zipball/1.0.0/

elm-review-indirect-internal

Provides elm-review rules to block indirect imports to Internal modules in your Elm project.

Useful for projects relying in git submodules.

Example configuration

module ReviewConfig exposing (config)

import NoIndirectInternal
import Review.Rule exposing (Rule)

config : List Rule
config =
    [ NoIndirectInternal.rule
    ]

Behavior

Accepted code

Internal module at the same folder:

module A exposing (..)
import A.Internal

Submodule of internal at the same folder:

module A exposing (..)
import A.Internal.B

Nested submodule of internal at the same folder:

module A exposing (..)
import A.Internal.B.C

Rejected code

Internal module at another folder:

module A exposing (..)
import B.Internal

Submodule of internal at another folder:

module A exposing (..)
import B.Internal.C

Nested submodule of internal at another folder:

module A exposing (..)
import B.Internal.C.D

Any nested internal module:

module A exposing (..)
import A.Internal.Internal

Any nested internal submodule:

module A exposing (..)
import A.Internal.B.Internal

Thanks

Thanks to @jfmengels for elm-review and its excellent documentation.