Closed ZaLiTHkA closed 2 years ago
now I'm starting to question my own reasoning here... so perhaps I'm actually missing the point of this exercise. š¤
in my local environment, I have VSCode to automatically format my code with Prettier on save.. so the optimal solution is simply to use a Prettier plugin for Netbeans, but I don't think there are any (at the moment).
on the Netbeans-specific side, I do know that I can customise the goals that are run through the project's "Actions" config.. so should I adjust the typical "run" and "build" actions in Netbeans to call prettier:check
and prettier:write
as we need and be done with it?
if someone else comes along later and decides they want to use IDEA (which does have Prettier support), then all our children should play nicely in the same sandpit, yes?
In general, we configure our IDEs to reformat with prettier on file save, but if Netbeans doesn't have any sort of prettier plugin then telling it to run prettier:write
on build seems like the next best thing. And then you'd generally run prettier:check
inside your CI environment to ensure that the build fails if someone accidentally checks in mis-formatted code
I guess I'm just tired of having to think of code formatting for everyone in our "team", so maybe I'm subconsciously hoping for some magic solution that will make me not have to do that. just today I saw yet another commit that adds "fixes" that literally revert the code formatting I did about 2 or 3 weeks back, even with a comment of "this is from before the auto format". š¤¦š¼āāļø I'm tired of it..
anyways, it is what it is.. let me leave it there and close off this issue before I digress into a rant about "the dangers of line based source control with people who don't give a shit about code quality"....
greetings..
we recently migrated some projects from a Netbeans-dependant Ant build process, over to Maven. I personally prefer to use VSCode with Prettier, but we have issue now with different code formatting rules in the different IDEs.
I've been trying to execute the
check
goal from theprettier-maven-plugin
automatically, but I'm just not winning.if I understand correctly, running
mvn validate
with the following in mypom.xml
"plugins" node should execute theprettier:check
goal as well:or am I missing something here?