Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] Team code format tool are not unified. #3

Open
ModestYjx opened this issue Feb 7, 2022 · 4 comments
Open

[feat] Team code format tool are not unified. #3

ModestYjx opened this issue Feb 7, 2022 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@ModestYjx
Copy link
Contributor

ModestYjx commented Feb 7, 2022

We can set a standard during "git commit".There is a lot useful tool to deal with this problem.
eg: git提交代码时自动遵守eslint+prettier规范格式化代码

@ModestYjx ModestYjx added the enhancement New feature or request label Feb 7, 2022
@ModestYjx
Copy link
Contributor Author

Add a code reformat installation tutorial to "./doc/developer-totorial.md" and link to README.

@zhicheng-ning
Copy link

I just checked some information about the eslint and prettier. It seems that eslint and prettier are both front-end code formatting tools, especially for javascript. Besides, for code formatting, I usually directly use the shortcut keys that come with the IDE, so I'm not sure what is the purpose of configuring this thing.

@ModestYjx
Copy link
Contributor Author

ModestYjx commented Feb 9, 2022

A good question!
For example, @BlueEmmaBlue likes using VSCODE, @zhicheng-ning likes using IDEA. If you are both reformat the code through IDE, it will result in too many redundant differences between a PR and we will don't clear what you modify. We will see many reformated codes in the changes of the PR.
image

@ModestYjx
Copy link
Contributor Author

@zhicheng-ning Before, I am using "pre-commit" to reformat the code during "git commit". "eslint" is only an eg, you can choose the best one to install.
references:
https://blog.csdn.net/wuheshi/article/details/104628747/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

2 participants