opencommit icon indicating copy to clipboard operation
opencommit copied to clipboard

[Doc]: Allow global configuration of commit rules via Commitlint/Conventional Commit

Open theusmoreira opened this issue 3 months ago • 0 comments
trafficstars

Description

Document the use of a global Commitlint configuration file (e.g., ~/.commitlintrc.js), so that Conventional Commit rules are applied to all projects, even when there is no local configuration.

Suggested Solution

OpenCommit should read the COMMITLINT_CONFIG environment variable and prioritize the global Commitlint configuration if there is no local configuration, ensuring automatic standardization of commit messages across all user projects. Include in the README a step-by-step guide on how to create, export, and use the global configuration.

Alternatives

Alternatives include creating symlinks to the global file in each project or maintaining bootstrap scripts for new repositories, but these require manual maintenance and do not scale well for multiple teams.

Additional Context

The same workflow should work for both the @commitlint module and the conventional-commit module, as long as the configured preset is @commitlint/config-conventional. Document the limitations and differences between the modules to avoid confusion.

theusmoreira avatar Aug 06 '25 13:08 theusmoreira