Skip to content

Missing Pre-commit Hooks for Linting #808

Open

Description

@amulyarstar

adding Husky and lint-staged. This will automatically run eslint on changed files right before a developer runs git commit, ensuring no poorly formatted code ever reaches a Pull Request

Activity

  1. amulyarstar commented on Oct 20, 2026

    @amulyarstar
    Author

    Hi @codeforgood I can implement this immediately. Here is the concrete technical flow I plan to set up:

    1. Dependencies: Add husky and lint-staged as developer dependencies to the root package.json.
    2. Configuration:
      • Initialize husky via npx husky init.
      • Configure a .husky/pre-commit hook file to invoke npx lint-staged.
      • Add a lint-staged config object to target changed .js, .jsx, .ts, and .tsx files, feeding them directly into the repository's native npm run lint or eslint --fix commands.
    3. Ergonomics: Add a prepare lifecycle script (husky) to guarantee that hooks are automatically installed when any developer runs npm install or yarn install.
      Please assign this to me, and I will open a clean, structured PR!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ Proxy