Add a configuration JSON specification for conventional commits. #124

Closed
opened 2026-02-17 11:48:14 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @fenilli on GitHub (Mar 23, 2021).

Couldn't conventional commits be using its specifications also in a configuration file style, editorconfig does something like that, we could use this to make sure open source projects adhere with a conventional for the types and scopes inside a project, instead of manuallly telling what those are for the users.

Also would make any editor be able to use a plugin that adheres to those conventions.

Originally created by @fenilli on GitHub (Mar 23, 2021). Couldn't conventional commits be using its specifications also in a configuration file style, editorconfig does something like that, we could use this to make sure open source projects adhere with a conventional for the types and scopes inside a project, instead of manuallly telling what those are for the users. Also would make any editor be able to use a plugin that adheres to those conventions.
Author
Owner

@fenilli commented on GitHub (Mar 24, 2021):

I came up with this JSON file looking for other kinda of configuration files, would be fine to use this as a specification? what other fields or changes could it have to be more stable to the conventional commits specification.

{
  "types": {
    "lengthMin": "2",
    "lengthMax": "8",
    "acceptDynamic": false,
    "extends": ["@yi-xu-0100/conventional-commit-types-i18n"],
    "excludes": ["ci", "docs"],
    "values": [
      {
        "newType": {
          "title": "New Type",
          "description": "This is the description",
          "emoji": ["sparkles", "tada"]
        }
      },
      {
        "newType2": {
          "title": "New Type Again",
          "description": "Where is your imagination?",
          "emoji": "bug"
        }
      }
    ]
  },
  "scopes": {
    "disablePrompt": false,
    "lengthMin": "1",
    "lengthMax": "10",
    "acceptDynamic": true,
    "extends": ["@yi-xu-0100/conventional-commit-scopes-i18n"],
    "excludes": ["common", "core"],
    "values": [
      {
        "changelog": {
          "title": "Change Log",
          "description": "Adding to the Change Log"
        }
      },
      {
        "release": {
          "title": "Release",
          "description": "To release a project version"
        }
      }
    ]
  },
  "emojis": {
    "disablePrompt": false,
    "forceEmojiUse": false,
    "values": {
      "sparkles": {
        "emoji": "✨",
        "code": ":sparkles:",
        "description": "Introduce new features"
      },
      "tada": {
        "emoji": "🎉",
        "code": ":tada:",
        "description": "Begin a project"
      },
      "bug": {
        "emoji": "🐛",
        "code": ":bug:",
        "description": "Fix a bug"
      }
    }
  },
  "content": {
    "description": {
      "lengthMin": "1",
      "lengthMax": "40"
    },
    "body": {
      "disablePrompt": false,
      "lengthMin": "1",
      "lengthMax": "100",
      "wrap": "72"
    },
    "footer": {
      "onlyExclamation": false,
      "disableExclamationPrompt": true,
      "appendBreakingChange": true,
      "lengthMin": "1",
      "lengthMax": "100",
      "wrap": "72"
    }
  }
}
@fenilli commented on GitHub (Mar 24, 2021): I came up with this JSON file looking for other kinda of configuration files, would be fine to use this as a specification? what other fields or changes could it have to be more stable to the conventional commits specification. ```json { "types": { "lengthMin": "2", "lengthMax": "8", "acceptDynamic": false, "extends": ["@yi-xu-0100/conventional-commit-types-i18n"], "excludes": ["ci", "docs"], "values": [ { "newType": { "title": "New Type", "description": "This is the description", "emoji": ["sparkles", "tada"] } }, { "newType2": { "title": "New Type Again", "description": "Where is your imagination?", "emoji": "bug" } } ] }, "scopes": { "disablePrompt": false, "lengthMin": "1", "lengthMax": "10", "acceptDynamic": true, "extends": ["@yi-xu-0100/conventional-commit-scopes-i18n"], "excludes": ["common", "core"], "values": [ { "changelog": { "title": "Change Log", "description": "Adding to the Change Log" } }, { "release": { "title": "Release", "description": "To release a project version" } } ] }, "emojis": { "disablePrompt": false, "forceEmojiUse": false, "values": { "sparkles": { "emoji": "✨", "code": ":sparkles:", "description": "Introduce new features" }, "tada": { "emoji": "🎉", "code": ":tada:", "description": "Begin a project" }, "bug": { "emoji": "🐛", "code": ":bug:", "description": "Fix a bug" } } }, "content": { "description": { "lengthMin": "1", "lengthMax": "40" }, "body": { "disablePrompt": false, "lengthMin": "1", "lengthMax": "100", "wrap": "72" }, "footer": { "onlyExclamation": false, "disableExclamationPrompt": true, "appendBreakingChange": true, "lengthMin": "1", "lengthMax": "100", "wrap": "72" } } } ```
Author
Owner

@fenilli commented on GitHub (Mar 24, 2021):

Closing as there is already the possibility of using .commitlintrc.json.

@fenilli commented on GitHub (Mar 24, 2021): Closing as there is already the possibility of using .commitlintrc.json.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/conventionalcommits.org#124