di-sukharev / di-sukharev/opencommit

Feature: How to commit with the rules of commitlint config file

Open
#60 5 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

I have a commit lint config file before every commits it follows the guideline of my commit rules. so how can I ensure that your opeancommit message follows the rules of my commit config.

my commit rules is :

module.exports = {
  extends: ['@commitlint/config-conventional'],
  rules: {
    'body-leading-blank': [2, 'always'], // enforce a blank line between subject and body
    'footer-leading-blank': [2, 'always'], // enforce a blank line between body and footer
    'header-max-length': [2, 'always', 100], // enforce a maximum header length of 100 characters
    'body-empty': [2, 'never'], // enforce to write a body
    'scope-empty': [2, 'never'], // enforce a non-empty scope
    'subject-empty': [2, 'never'], // enforce a non-empty subject
    'subject-full-stop': [2, 'never', '.'], // enforce no trailing period in subject
    'type-empty': [2, 'never'], // enforce a non-empty type
    'type-enum': [
      2,
      'always',
      ['feat', 'fix', 'docs', 'style', 'refactor', 'test', 'chore'],
    ], // enforce a list of valid types
  },
};

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

The issue provides a JavaScript commitlint configuration but names no repository files or tests. Start by locating the commit-message generation flow and determine how the supplied rules could be applied; done means generated messages comply with the configured commitlint rules.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, javascript
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.