Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is useful in Dockerfiles:
There’s no need for elm-format in a build. Installing it and running it slows the build down. This is true for other builds than Docker ones, too.
elm-format does not work in all Docker images. In Alpine images, it does not work at all. The default
node
image uses Debian Stretch, but elm-format 0.8.4 requires Debian Buster. Sometimes it’s easier to disable elm-format than to switch image. Dillon also mentioned that elm-format 0.8.4 is also causing issues in the default Netlify build.This PR adds a
--skip-elm-format
flag that skips running elm-format on the generated output.Unfortunately, the generated Elm code is not syntactically valid. The Elm compiler does not accept it, but elm-format’s more lenient parser does. So I had to add a space here and there in the code generation so the output of a
elm-graphql --skip-elm-format
run is still valid. I think it’s good not to rely on elm-format’s parser anyway.I recommend reviewing commit by commit in order not to get lost in the sea of
no-format-example/
files.