Skip to content

feat(ci): add husky and lint-staged pre-commit hooks for linting - #809

Open
kunaltaydetayde7552-ship-it wants to merge 2 commits into
CodeForGoodTech:mainfrom
kunaltaydetayde7552-ship-it:feat-precommit-lint-hooks
Open

kunaltaydetayde7552-ship-it wants to merge 2 commits into
CodeForGoodTech:mainfrom
kunaltaydetayde7552-ship-it:feat-precommit-lint-hooks

Conversation

@kunaltaydetayde7552-ship-it

Copy link
Copy Markdown

Description

Closes #808

This PR introduces Husky and lint-staged to establish automated pre-commit linting and formatting for repository files:

  • Husky: Adds automated git hooks via a \prepare\ script.\
  • lint-staged: Runs \prettier --write\ on staged Markdown, JSON, YAML, and \eslint --fix\ on JavaScript files prior to committing.\
  • Formatting Configuration: Adds .prettierrc.json, .prettierignore, and flat \eslint.config.mjs.\
  • GitHub Actions CI: Adds .github/workflows/lint.yml\ to run
    pm run lint\ on pushes and pull requests.\
  • Documentation: Updates \README.md\ with contributing instructions for local setup and lint commands.\

Verification

  • Executed
    pm run lint\ (exited 0 with all files formatted).
  • Verified pre-commit hook triggers and executes automatically on \git commit.

Signed-off-by: kunaltaydetayde7552-ship-it <kunaltaydetayde7552@gmail.com>
Signed-off-by: kunaltaydetayde7552-ship-it <kunaltaydetayde7552@gmail.com>
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.

Missing Pre-commit Hooks for Linting

1 participant