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

Feature : Add husky githook for checking linting error, format fix and typecheck #125

Open
29deepanshutyagi opened this issue Feb 3, 2025 · 1 comment

Comments

@29deepanshutyagi
Copy link

We need this improvement to ensure consistent code quality and prevent common errors before they are committed to the repository. This will help in maintaining a clean and error-free codebase.


This change will automate the process of checking for linting errors, formatting issues, and type checking before any commit is made. It will save time for developers and improve the overall quality of the codebase.


The motivation behind this change is to enforce coding standards, ensure consistency across the codebase, and catch potential errors early in the development process.

Description:

We need to add Husky as a git hook manager and configure it to run linting, formatting, and type checking scripts before allowing commits. This involves adding necessary dependencies, configuring Husky in the package.json file, and defining the scripts to run.

Will this be a breaking change?
This change should not be breaking unless there are significant conflicts with existing git hooks or if developers are not following linting, formatting, or type checking rules strictly.

How could it be implemented/designed?
Implementation involves the following steps:
    Install necessary dependencies such as Husky, Prettier, eslint.
    Configure Husky in the package.json file to trigger hooks on specific git events (e.g., pre-commit).
    Define scripts to run linting, formatting, and type checking tasks in the package.json file.
    Test the setup by making changes to the code and verifying that the hooks are triggered correctly
@29deepanshutyagi
Copy link
Author

29deepanshutyagi commented Feb 3, 2025

If this is valid issue please assign this to me @JeelRajodiya

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

No branches or pull requests

1 participant