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

Add pnpm lint:fix (or eslint --fix) as a pre-commit hook #125

Open
dinmukhamedm opened this issue Nov 1, 2024 · 4 comments
Open

Add pnpm lint:fix (or eslint --fix) as a pre-commit hook #125

dinmukhamedm opened this issue Nov 1, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request frontend Requires work in the frontend package good first issue Good for newcomers

Comments

@dinmukhamedm
Copy link
Member

We need to add a pre-commit hook to lint the code in order to avoid having to recommit just the lints. This might be especially frustrating for outside contributors.

Here's a couple good guides:

  1. https://levelup.gitconnected.com/how-to-run-eslint-using-pre-commit-hook-25984fbce17e
  2. https://gist.github.com/estorgio/e8bcaa8e87d0fcdcf85fdf598956e34c

Note: we probably just need eslint, and maybe optionally prettier

@dinmukhamedm dinmukhamedm added enhancement New feature or request good first issue Good for newcomers frontend Requires work in the frontend package labels Nov 1, 2024
@lucky29-git
Copy link
Contributor

@dinmukhamedm Can I work on this?
I never added a pre-commit hook before, this looks something new to me.
I would like to work on this.

@lucky29-git
Copy link
Contributor

/assign

@dinmukhamedm
Copy link
Member Author

Sure, you can. Ideally, I would like that nobody has to install the pre-commit cli command, especially for it's downloaded from pip... @lucky29-git Let's work together to check if it's enough to install it once when creating/testing the hooks, but not when using them

@lucky29-git
Copy link
Contributor

Sure @dinmukhamedm, let me do some research, I will get back to you soon on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request frontend Requires work in the frontend package good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants