You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently you must either correctly specify --elm-version=... when running elm-format, or use the binary that defaults to the elm version you need. Maybe elm-format could auto-detect the elm version, but there are problems to consider...
elm-format could read the elm.json/elm-package.json to read the supported elm version and use the highest supported version. The downside of this is that plugin authors would need to run elm-format from the correct working directory that contains the elm.json file.
if elm.json is not found, it could give an error telling you to specify --elm-version=...
if elm.json is not found, it could just use the latest elm version
elm-format could keep track of what syntax it sees while parsing and determine the version based on whether it sees syntax from older versions. The downside here is that this might get confusing for implementing the --upgrade feature, and it's much more difficult to implement, and it might be possible to see syntax from multiple versions, so how should that be handled?
Please comment below on:
would any of this be useful? What would work best for the scenarios / projects you are familiar with? are there other ideas of how to solve this, or do you even think this is a problem?
The text was updated successfully, but these errors were encountered:
Currently you must either correctly specify
--elm-version=...
when running elm-format, or use the binary that defaults to the elm version you need. Maybe elm-format could auto-detect the elm version, but there are problems to consider...elm.json
/elm-package.json
to read the supported elm version and use the highest supported version. The downside of this is that plugin authors would need to run elm-format from the correct working directory that contains the elm.json file.--elm-version=...
--upgrade
feature, and it's much more difficult to implement, and it might be possible to see syntax from multiple versions, so how should that be handled?Please comment below on:
The text was updated successfully, but these errors were encountered: