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
distracting merging conflicts when IDE's have some default formatting in lieu of no default being available
breaking habits manually is hard and requires mental attention
potentially high mental capacity cost to properly scan a project manually to check for specific patterns and make sure you're consistent.
What I have found is that this requires an auto-format solution that is comprehensive enough to leave very little room for personal touch -- and where that room exists, it's so minuscule that making it unregulated is OK.
The end result is absolute ~98% consistency while eliminating all manual labor or attention concerning code format.
For the past 3-4 years, all my JS projects automatically come with https://prettier.io/. This is hooked into the existing eslint --fix functionality so it's not reliant on any IDE. The workflow I recommend is to auto-format on file save so the code is perfect at any given moment so you don't have to deal with it even while actively writing.
This can also be enforced via eslint or auto-run via git hooks.
This is all stuff I've prepared in the past so I'm happy to set this all up -- want to know what people's thoughts are! Thanks.
The text was updated successfully, but these errors were encountered:
Prettier's default styles are fairly different than all of our other JS. wp-prettier with the @wordpress/prettier-config keeps the standards inline with the rest of the code we are writing.
Dealing with styles can be a huge time sink:
What I have found is that this requires an auto-format solution that is comprehensive enough to leave very little room for personal touch -- and where that room exists, it's so minuscule that making it unregulated is OK.
The end result is absolute ~98% consistency while eliminating all manual labor or attention concerning code format.
For the past 3-4 years, all my JS projects automatically come with https://prettier.io/. This is hooked into the existing eslint --fix functionality so it's not reliant on any IDE. The workflow I recommend is to auto-format on file save so the code is perfect at any given moment so you don't have to deal with it even while actively writing.
This can also be enforced via eslint or auto-run via git hooks.
This is all stuff I've prepared in the past so I'm happy to set this all up -- want to know what people's thoughts are! Thanks.
The text was updated successfully, but these errors were encountered: