di-sukharev / di-sukharev/opencommit

[Feature]: Use standard config file naming

Open
#501 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
7.5k
Forks
445
Avg merge
18m
Merged PRs (30d)
2

Description

Description

I see there’s already an issue about using a .env file for local config, and a PR that renames it to .opencommit.env.

However, this naming does not follow common Node.js config file conventions.

Examples of standard config file names:

  • ESLint: .eslintrc / eslint.config.js
  • Prettier: .prettierrc
  • Stylelint: .stylelintrc
  • Jest: jest.config.js
Suggested Solution

Use a config loader like cosmiconfig, which supports popular formats like .opencommitrc, opencommit.config.js, etc.

By default, Cosmiconfig will check the current directory for the following:

  • a package.json property
  • a JSON or YAML, extensionless "rc file"
  • an "rc file" with the extensions .json, .yaml, .yml, .js, .ts, .mjs, or .cjs
  • any of the above two inside a .config subdirectory
  • a .config.js, .config.ts, .config.mjs, or .config.cjs file

This would:

Happy to help if needed!

Alternatives

No response

Additional Context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the custom configuration logic in src/commands/config.ts, especially lines 919-931, and review the related issue 305 and PR 480. Evaluate how a cosmiconfig-based loader would handle the proposed standard names and formats, including loading and merging configuration. Done means the supported standard naming conventions work and the custom logic can be removed where appropriate.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
cli, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.