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

[PROPOSAL] Enforcing coding conventions and formatting with Husky pre-commit hooks #198

Closed
CCongWang opened this issue Apr 26, 2022 · 2 comments · Fixed by #201
Closed
Assignees
Labels
enhancement New feature or request

Comments

@CCongWang
Copy link
Collaborator

What is the problem? What is preventing you from meeting the requirements?
prettier was added in #70, and was integrated with ESLint to apply coding conventions and formatting rules to the project in #186. However, contributors need to manually run the lint command to lint and fix the code, if we don't run them regularly, we see inconsistent code formatting around the project.

What are you proposing? What do you suggest we do to solve the problem or improve the existing situation?
We can utilize Husky pre-commit hooks to run lint command and formatting check automatically, to make sure code changes in each commit are consistent in coding conventions and formatting.

@CCongWang CCongWang added the enhancement New feature or request label Apr 26, 2022
@CCongWang CCongWang self-assigned this Apr 26, 2022
@seraphjiang
Copy link
Member

add small request, could we add the pre-commit setup/usage to
https://github.com/opensearch-project/opensearch-dashboards-functional-test/blob/main/CONTRIBUTING.md

@CCongWang
Copy link
Collaborator Author

@joshuali925 @ohltyler @davidcui1225 @bowenlan-amzn @annie3431

Hi plugin owners, we plan to use precommit hook to run lint command automatically, the goal is to make the code styles and formatting consistent, please check out the PR and updated Formatting section in CONTRIBUTING. Let me know if you have questions/concerns/suggestions! Thanks!

@seraphjiang seraphjiang linked a pull request Apr 27, 2022 that will close this issue
1 task
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
None yet
Development

Successfully merging a pull request may close this issue.

2 participants