wikitree / wikitree-dynamic-tree

Dynamically generated and browsed graphical family tree
MIT License
26 stars 20 forks source link

Code Style Guidelines #31

Open bcaseyrls opened 2 years ago

bcaseyrls commented 2 years ago

We'd like to have some guidelines for code formatting and style, if only so that we don't have a bunch of changes to review on a merge that are just spacing or something else irrelevant.

@MichalVasut has already mentioned "prettier" (https://github.com/wikitree/wikitree-dynamic-tree/pull/11#issuecomment-1268598911) which I think would provide a decent starting place.

There's info on editor integration here: https://prettier.io/docs/en/editors.html

The repo already has a .prettierrc file (contributed, I believe, by @MichalVasut). I think that's a good place to start. @MichalVasut, you mentioned creating a codestyle.md document. I think that would be helpful, perhaps with some info on what styles have been configured (for those not using prettier) and a few notes on integrating .prettierrc with various development environments.

MichalVasut commented 2 years ago

Sure, I'll make some docs today and we can discuss the parameters later.

On Tue, Oct 11, 2022, 17:27 Brian Casey @.***> wrote:

We'd like to have some guidelines for code formatting and style, if only so that we don't have a bunch of changes to review on a merge that are just spacing or something else irrelevant.

@MichalVasut https://github.com/MichalVasut has already mentioned "prettier" (#11 (comment) https://github.com/wikitree/wikitree-dynamic-tree/pull/11#issuecomment-1268598911) which I think would provide a decent starting place.

There's info on editor integration here: https://prettier.io/docs/en/editors.html

The repo already has a .prettierrc file (contributed, I believe, by @MichalVasut https://github.com/MichalVasut). I think that's a good place to start. @MichalVasut https://github.com/MichalVasut, you mentioned creating a codestyle.md document. I think that would be helpful, perhaps with some info on what styles have been configured (for those not using prettier) and a few notes on integrating .prettierrc with various development environments.

— Reply to this email directly, view it on GitHub https://github.com/wikitree/wikitree-dynamic-tree/issues/31, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE72UOV53TSBLTO53XVZMNDWCWBM3ANCNFSM6AAAAAARCNA4LE . You are receiving this because you were mentioned.Message ID: @.***>

bcaseyrls commented 2 years ago

Sound good; thanks.

I've re-saved some files with the "prettier" formatting applied. For reference, I'm using VS Code and

https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode

I also found https://marketplace.visualstudio.com/items?itemName=tombonnike.vscode-status-bar-format-toggle useful.

Clarke-11007 commented 2 years ago

I just installed Prettier now ... but of course that is AFTER I've just made another PULL REQUEST for the Fan Chart view ...

Sorry Brian for the extra work - but - if I get this working, then hopefully future Pulls from the Fan Chart won't require you to do a lot of re-editing of my code.

Thanks for all you do - and Michal for helping us (or our code) to look good! -Greg :-)

On Tue, Oct 11, 2022 at 11:41 AM Brian Casey @.***> wrote:

Sound good; thanks.

I've re-saved some files with the "prettier" formatting applied. For reference, I'm using VS Code and

https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode

I also found https://marketplace.visualstudio.com/items?itemName=tombonnike.vscode-status-bar-format-toggle useful.

— Reply to this email directly, view it on GitHub https://github.com/wikitree/wikitree-dynamic-tree/issues/31#issuecomment-1274902580, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3JDGBWTSDFRASTIZFXKWF3WCWDBBANCNFSM6AAAAAARCNA4LE . You are receiving this because you are subscribed to this thread.Message ID: @.***>