Closed pacbeckh closed 7 years ago
@pacbeckh, thanks for the report!
I noticed there's a syntax error:
module Foo (selectEventHandler)
should be
module Foo exposing (selectEventHandler)
When I added " exposing ", Add Import
worked as usual. I have to investigate further.
I managed to reduce the problem to:
module Foo exposing (..)
import Json.Decode
import Html.Events
selectEventHandler : (Maybe Int -> msg) -> Html.Attribute msg
selectEventHandler onSelect =
Html.Events.on "change" (Json.Decode.fail "")
It seems that if import Html.Events
import is already present, it cannot also add import Html
Demo:
Also tested by @stil4m
Hmm, weird that it's working on my computer :thinking:
Oh! You're using the Quick Fix
command of linter-elm-make
. It does not have information about the imports. Let's move this issue there.
@halohalospecial , it is indeed the Quick Fix
command. I should have made that more clear.
It does work if import Html.Event
is removed.
Given the following file:
An import is suggested for Html.Attribute. Nothing happens when Add Import is executed:![ScreenCapture](https://media.giphy.com/media/3o7bugEe7cvObUdG6I/source.gif)