ecohabit icon indicating copy to clipboard operation
ecohabit copied to clipboard

Prettier setting in config file in the repo should apply all contributors code automatically

Open lugenx opened this issue 2 years ago • 14 comments

lugenx avatar Dec 07 '22 20:12 lugenx

If we use a pre-commit hook to format with every commit, will that work? As prettier will already we installed as a dev dependency.

AbhiBajpaishek avatar Dec 14 '22 18:12 AbhiBajpaishek

i am not familiar with pre-commit hooks, if that solves the problem it's great actually. could you take care of that?

lugenx avatar Dec 14 '22 19:12 lugenx

I've also never implemented this myself but I want to pick this up. Could you please edit the Issue title and assign this ticket to me?

AbhiBajpaishek avatar Dec 14 '22 19:12 AbhiBajpaishek

edited and assigned, thank you.

lugenx avatar Dec 14 '22 20:12 lugenx

Facing hurdles on this as we have mono repo kind of setup and preCommit is struggling as there are mutiple package.json and .git file is not in same folder as in package.json.

I'm still trying will keep updated.

AbhiBajpaishek avatar Dec 22 '22 13:12 AbhiBajpaishek

thank you for the update.

lugenx avatar Dec 22 '22 17:12 lugenx

@AbhiBajpaishek, are you still working on this? I know this is a tricky issue. I also couldn't figure it out. I will remove an assignment from this to see if it can catch the attention of someone with a solution. Please still let me know if you find out.

lugenx avatar Mar 01 '23 23:03 lugenx

@lugenx Hi I have some idea on how to use pre-commit hooks to resolve this issue. Can I work on it?

AyanDas348 avatar May 23 '23 14:05 AyanDas348

hi @AyanDas348 , sure, please go ahead. I have assigned this issue to you 👍

lugenx avatar May 23 '23 18:05 lugenx

hi @lugenx , if this issue is open, assign it to me, please. Thanks

itegika avatar Jul 28 '23 00:07 itegika

sure, i assigned this to you @itegika, please make sure that you read all the comments above before starting to work. let me know if you have any questions.

lugenx avatar Aug 01 '23 02:08 lugenx

Sure, thank you)

itegika avatar Aug 01 '23 02:08 itegika

Hi, @lugenx , sent PR regarding this issue https://github.com/lugenx/ecohabit/pull/233 Thanks

itegika avatar Aug 04 '23 13:08 itegika

Hi, @lugenx found a solution using husky. Is that an option available?

AyanDas348 avatar Nov 27 '23 10:11 AyanDas348