no-stack-dub-sack / apexdox-vs-code

A lightweight VS Code extension that makes documenting your Salesforce Apex files an easy, integrated experience.
Other
49 stars 7 forks source link

Prettier - format files #49

Closed dschach closed 2 years ago

dschach commented 2 years ago

Lots of file formatting. Purely cosmetic, but brings all files in src folder to standard formatting, to make future development easier. (Better to deal with whitespace changes all at once now than piecemeal later, obscuring real changes.) The trailing commas in some of the objects are weird, but they're allowed in es5, so I'm not going to argue.

no-stack-dub-sack commented 2 years ago

@dschach while I admire the what this is trying to achieve, and I wish I used Prettier to begin with back then, this introduces a major set of changes that while I can be pretty sure are benign just does not seem like a high enough priority to consider this at the moment.

One concrete example I can point to is Prettier formatting certain bits of conditional logic and wrapping with parens which could change how that logic is executed. Our tests should catch this sort of thing but this just may not be required at the moment.

dschach commented 2 years ago

Yeah, I hear you. I was trying to figure out the code and thought it would make it more readable. I love this extension so much that I would like to find a way to help. It would be cool to get command line into it so it could be done automatically by Husky pre-commit, for example.

no-stack-dub-sack commented 2 years ago

@dschach command line has been the most requested feature (requested maybe thrice), but I just haven't had the time to really look into it. the way the vscode api is embedded into a lot of the code makes it a bit tricky I think. While I love that you love the extension, it still doesn't seem quite popular enough to warrant pouring tons of time into (based on GH stars and overall number of installs). That said, if this is something you can find a way to achieve, I would definitely consider that PR.