Hello Everyone,
I have an open-source react project. I want to know how to manage contributions to my projects. Recently, some contributors made Pull Request, and there were so many commits in the PR apart from the actual commit code like single quotes changes to double quotes.
You can see in this commit.
I want to know how to avoid these types of commits.
I read on the internet that I need to use eslint and prettier to avoid this, so, I tried to set up the eslint + prettier on the root of the project folder.
Anyone can guide me How to setup it properly in my react app so, I can avoid these types of commit?
Any suggestions apart from this to manage the project contributions. Any help would be much appreciated.
First, this contributor is being a bit rude - it’s perfectly OK to reject a PR for including a bunch of style changes that are unrelated to the functional changes.
If you want to add a tool to your repository to prevent this sort of formatting wars stuff, my general workflow would be
make a new branch
add the configuration files for whatever style tool that you want to use
apply the style changes
add a file with notes to future contributors explaining procedures for making correctly formatted PRs
merge this new branch with the style changes into your main branch