Add Ecto formatter config example to "Getting Started" guide#4612
Add Ecto formatter config example to "Getting Started" guide#4612josevalim merged 4 commits intoelixir-ecto:masterfrom
Conversation
| [ | ||
| # Add these lines to enable Ecto formatter rules | ||
| import_deps: [:ecto, :ecto_sql], | ||
| subdirectories: ["priv/*/migrations"], |
There was a problem hiding this comment.
In theory we don't need this, unless you want to have an additional file at priv/*/migrations that imports ecto_sql:
| subdirectories: ["priv/*/migrations"], |
There was a problem hiding this comment.
EDIT: I misread this at first, maybe let's just remove that line to keep things simple.
There was a problem hiding this comment.
OK, done.
In theory, it could be better with more info, but that would also distract from the main purpose of the guide: To get started.
At least this gets the reader going with the idea that there are formatter rules, without cluttering up the intro guide too much. So if they run into issues with their migration formatting, and they care to look into it, they at least have some keywords to work with, e.g. "ecto migration formatter"
|
💚 💙 💜 💛 ❤️ |
I was following through the Getting Started guide, and noticed that the formatter config was not present in there, so I added a brief section on adding it. Now, I have no more ugly brackets in my Ecto migrations when I follow the guide!