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
In order to honor our third principle, I'd like to open a discussion and gather your feedback.
Context
In the Dawn prettier demo, we got the following feedback:
I wonder if this should also apply to SVG elements in liquid files like this for icons. 🤔 Definitely easier to read but I feel like it isn't necessary.
To which I replied that I can think of four ways to solve this:
We don't run prettier on SVG liquid files (no code change)
We have a special rule about Liquid files that only have 1 SVG element
We never open SVG elements, even in the middle of files
We make that configurable
Option 1. Don't do anything
This issue can be solved by simply omitting the files from the prettier command regex.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
In order to honor our third principle, I'd like to open a discussion and gather your feedback.
Context
In the Dawn prettier demo, we got the following feedback:
To which I replied that I can think of four ways to solve this:
Option 1. Don't do anything
This issue can be solved by simply omitting the files from the prettier command regex.
That is, instead of running the following:
prettier --write '**/*.liquid'
Run the following:
Option 2. Special rule for svg-only Liquid files
If the file has only one node, and that node is an SVG element. Print as is.
Option 3. Never break svg attributes
Add an exception and never break svg attributes. Anywhere.
2 votes ·
Beta Was this translation helpful? Give feedback.
All reactions