Open qwfy opened 4 years ago
That's great feedback. The elm-coder-generator It was developed without regard to elm-format.
I am planning to port a lot of the code to https://package.elm-lang.org/packages/stil4m/elm-syntax/latest/ and also have a stable output when formatted.
However, as a more efficient solutioin, if you want to plug elm-format into the index.js a PR is very welcome. We don't even need a flag.
Some developers have their IDE/editors setup such that, when file is saved,
elm-format
is run to format the file. However, if thereelm-coder-generator
manipulates the file, the manipulated file would no longer beelm-format
-valid, depending on whether or not the developer saves the file again or not, the manipulate file would have two possible formats:elm-format
-validelm-format
-validconsider the following scenario:
elm-coder-generator
a file, don't save it in the IDE, commit the file to git-- [generator-start] .. -- [generator-end]
-- [generator-start] .. -- [generator-end]
if we can pass the generated code through
elm-format
, the problem would be solved.