-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Currently, the project relies solely on CI if-nodejs-pr-testing.yml workflow to catch lint errors.
This creates a slow feedback loop in which a contributor pushes code -> waits for the CI to run -> sees a failure -> fixes a small styling issue -> and has to push again.
I experienced this from my recent pr #4997
Solution - Add pre-commit hooks using Husky and lint-staged to automatically run ESLint and Prettier on staged files before each commit. This will catch linting issues early in the development cycle, reducing CI failures and review round-trips.
How this Setup will work -
1- when a developer runs git commit - Husky triggers
2- lint-staged scans only the files that are currently staged
3- It runs Prettier and ESLint on those files.
4- If it can fix the errors automatically, it does so and adds them to the commit. If not, it warns the user.
Yes, I am interested in making a pr!!
Metadata
Metadata
Assignees
Labels
Type
Projects
Status