Mayank0255 / Stackoverflow-Clone-Frontend

Clone project of a famous Q/A website for developers built using MySQL, Express, React, Node, Sequelize :globe_with_meridians:
https://stackoverflow-clone-client.vercel.app
MIT License
546 stars 209 forks source link

Setup husky to the project #33

Closed Mayank0255 closed 3 years ago

Mayank0255 commented 3 years ago

This is to save some time reviewing the code and then changing the linting errors. Which will be done by locally automating this process before committing the code

Husky Package

avinashupadhya99 commented 3 years ago

Hey, can I give this a go? Thanks

Mayank0255 commented 3 years ago

@avinashupadhya99

Sure, go ahead

Mayank0255 commented 3 years ago

@avinashupadhya99

While setting it up, go through the linting requirements imposed in this project

avinashupadhya99 commented 3 years ago

Hey @Mayank0255 , this might be a little stupid question. How do you normally run the lint locally? Have you installed eslint and eslint-config-react-app dependencies globally? If that's the case, I will need to install those as dev dependencies for the client package. If there's another way to run it, please let me know.

Mayank0255 commented 3 years ago

@avinashupadhya99

Usually, the developers use vscode or webstorm for this kind of stuff in which the IDE configures the linting files to the project.

If you have a better approach for this then go ahead and add creativity to the project. New ideas and suggestions are always welcomed 😃

avinashupadhya99 commented 3 years ago

I think adding them as dev dependencies will ensure it will work just about anywhere. I'll set that up soon.

Mayank0255 commented 3 years ago

Sure, go ahead

Mayank0255 commented 3 years ago

@avinashupadhya99 what's the status on this issue??

avinashupadhya99 commented 3 years ago

Hey, I will make the PR for this tomorrow. Sorry for the delay

Mayank0255 commented 3 years ago

@avinashupadhya99 Sure man

Mayank0255 commented 3 years ago

@avinashupadhya99 I just tried out husky and it warns fine but isn't there an option to fix those discrepancies automatically? Rather than manually doing so?