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

(chore) Add ESLint Rules for React-Hooks #1862

Merged
merged 8 commits into from
Jun 15, 2024

Conversation

nravilla
Copy link
Contributor

@nravilla nravilla commented Jun 11, 2024

Requirements

  • This PR has a title that briefly describes the work done including the ticket number. If there is a ticket, make sure your PR title includes the ticket number in the format OHRI-123 My PR title.
  • My work includes tests or is validated by existing tests.

Summary

Description:
This pull request introduces the following updates to the OHRI repository:
1. ESLint Rules for React-Hooks:

  • Implemented ESLint rules specific to React Hooks (missing dependencies, exhaustive-deps, import type) to ensure consistency and adherence to best practices.
  • The rules are aligned with those used in the OpenMRS patient-chart project, promoting uniformity across projects.

2. Husky and Lint-Staged Integration:

  • Added Husky to manage Git hooks, enabling automated tasks to run at various stages of the Git workflow.
  • Configured Lint-Staged to run ESLint checks on staged files before commits, ensuring that code adheres to linting standards before being committed.

Screenshots

image

image

Related Issue

Other

The changes were tested by comparing localhost functionality with the OHRI-dev

@nravilla nravilla changed the title Add ESLint Rules for React-Hooks (chore) Add ESLint Rules for React-Hooks Jun 11, 2024
@nravilla nravilla marked this pull request as ready for review June 12, 2024 20:14
@hadijahkyampeire
Copy link
Contributor

@nravilla you have some merge conflicts, would you resolve them please.

Copy link
Contributor

@eudson eudson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nravilla the PR has conflicts

Copy link
Contributor

@hadijahkyampeire hadijahkyampeire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @nravilla just a few comments

.eslintrc Outdated Show resolved Hide resolved
.husky/pre-commit Outdated Show resolved Hide resolved
package.json Show resolved Hide resolved
yarn.lock Outdated Show resolved Hide resolved
@nravilla
Copy link
Contributor Author

Hi Hadijah, Eudson,

thank you for your excellent catch (commented line and yarn.lock) during review yesterday. i have resolved all the issues that was raised. please let me know if you have any questions or concerns, Thank you so much!

Copy link
Contributor

@hadijahkyampeire hadijahkyampeire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @nravilla we can merge this.

@hadijahkyampeire hadijahkyampeire merged commit 98ee403 into UCSF-IGHS:dev Jun 15, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants