Skip to content

Add support for jsonc (JSON with Comments) for Lefthook config files #1268

@Bertie690

Description

@Bertie690

Description

For context, I've currently been using lefthook for several repos, and am 100% enjoying it thus far.

As of current, Lefthook supports config files in YAML, TOML and JSON.
I much prefer JSON-style configs over YAML and TOML, but I also like having comments in my files (which plain JSON does not support).

As such, I propose adding JSONC as a supported extension for Lefthook's config files. This would use the same innate parsing as JSON, perhaps using a tool such as hujson to strip comments beforehand.

What problem it is solving?

People can (and do!) want to use JSON configurations while still having comments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestA new lefthook feature description

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions