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

[CI] Fix husky and lint-staged issues #123

Closed
niloysikdar opened this issue Oct 15, 2022 · 1 comment · Fixed by #126
Closed

[CI] Fix husky and lint-staged issues #123

niloysikdar opened this issue Oct 15, 2022 · 1 comment · Fixed by #126
Assignees
Labels
bug Something isn't working hacktoberfest This is included under Hacktoberfest released

Comments

@niloysikdar
Copy link
Member

niloysikdar commented Oct 15, 2022

Description:

Currently, if we try to commit anything then the pre-commit git hook will automatically get triggered using Husky. Now it runs the yarn lint-staged command to check the lining rules of the code from the staged files. If we try to run the yarn lint-staged command normally after git add, it works fine. But when it runs inside an environment like husky, it will continuously produce an excess amount of the same logs, which blows up the terminal/cmd.

Additional Info

OS: Windows 10
husky Version: 8.0.0
lint-staged version: 13.0.2

References:

Also, we can remove git add -A . from the pre-commit hook after yarn lint-staged.

@niloysikdar niloysikdar added bug Something isn't working hacktoberfest This is included under Hacktoberfest labels Oct 15, 2022
@niloysikdar niloysikdar changed the title [CI] Fix Husky issues [CI] Fix husky and lint-staged issues Oct 15, 2022
@niloysikdar niloysikdar self-assigned this Oct 15, 2022
niloysikdar added a commit that referenced this issue Oct 15, 2022
Fix the excess amount of the same logs, which blows up the terminal/cmd on windows while running
lint-staged from husky

Fixes #123

Signed-off-by: Niloy Sikdar <niloysikdar30@gmail.com>
niloysikdar added a commit that referenced this issue Oct 17, 2022
Fix the excess amount of the same logs, which blows up the terminal/cmd on windows while running
lint-staged from husky

Fixes #123

Signed-off-by: Niloy Sikdar <niloysikdar30@gmail.com>
@github-actions
Copy link

🎉 This PR is included in version 1.15.5 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hacktoberfest This is included under Hacktoberfest released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant