-
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
NoMissingTypeExpose
aims to make sure that a type is accessible if its value is accessible outside a module. However, it seems that it is giving a false positive result on a specific case.
That specific case is when a type alias
is used inside a module to refer to an imported type with another name (usually to shorten it or to avoid clashes or confusion). NoMissingTypeExpose
raises an error in that case, but I think it should not, because the type is actually available.
module ThisOne exposing (something)
import SomeModule exposing (OneLongTypeName)
type alias Short = OneLongTypeName
-- elm-review complains that Short isn't exposed, but that's unnecessary
-- because OneLongTypeName is already exposed by SomeModule and is accessible.
something : Int -> Short
something = …
I think there could be a separate rule for preventing local aliasing like that if there's a need for that. The use case is different, and people may want one but not the other.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed