Skip to content

lint-staged could not find any valid configuration #2463

@jonchurch

Description

@jonchurch

Problem

When attempting to commit, the pre-commit hook fails due to missing lint-staged config.
✖ lint-staged could not find any valid configuration.

So I have to --no-verify (or nuke the pre-commit hook) to commit.

Context

After #2129 lint-staged was dropped. Since I have committed/run pnpm i before on this repo, my local .git dir has the precommit hook setup. It was never cleaned up, so it remains.

This is not a big deal for me, and likely many folks who know how to fix it. But I am surprised to not see an issue about it. Was this known or handled or messaged elsewhere?

Is there some quirk of my own setup which made me run into this while other contributors did not? Was there a cleanup script and I just missed the window?

Solution

For anyone else who runs into this and found this issue:
the fix is rm .git/hooks/pre-commit or even the whole dir.

Metadata

Metadata

Assignees

No one assigned

    Labels

    p3Priority 3 bug (low)

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions