Skip to content

Pre-commit hooks check misses husky/lint-staged (JS ecosystem) #3

Description

@Nayjest

collect.py credits pre-commit hooks only for .pre-commit-config.yaml (the Python-ecosystem tool). The JavaScript equivalents are invisible.

Observed on express-rate-limit/express-rate-limit (report scores pre_commit_hooks 0/9.6): the repo has a .husky/ directory, husky in devDependencies with a prepare: husky script, a lint-staged config block in package.json, and a pre-commit: lint-staged script — a fully wired pre-commit setup.

Suggested detection additions:

  • .husky/ directory (with at least one non-underscore file)
  • lint-staged key in package.json, or .lintstagedrc*
  • lefthook.yml / .lefthook.yml

package.json is already fetched as a manifest text (embedded_linter_configs reads it), so this needs no extra API calls.

Activity

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