Open kachkaev opened 5 years ago
I released prettier-plugin-elm@0.4.0-rc.1
, but will be happy to wait for elm-format@0.8.1
before making it stable. It'd be great to know if this issue could be closed before then or if the behaviour is intentional.
Huh, I'm surprised your first example works, because according to elm make
, an Elm file is not valid unless it contains at least one definition in it. I guess this seems to me like something that is relevant to https://github.com/avh4/elm-format/issues/65 but that isn't meant to be supported in the normal format-a-full-file mode.
IMHO just having imports, comments or the module definition should not make the file unformattable 🤔
Similarly, writing import Something exposing (something)
won't compile if Something
is not around. However, formatting this line is totally fine.
Hi @avh4! I am upgrading
prettier-plugin-elm
in https://github.com/gicentre/prettier-plugin-elm/pull/4 and it looks like I have found a broken edge case. Elm-format reports a syntax error when a given file only contains an import statement that is not followed by\n
.Steps to reproduce:
(all ok)
(I did not expect this)
Import statements not followed by new lines are these kind of blocks in markdown files: