question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[FEAT] Add conventionalCommits.types so its possible to change the default types.

See original GitHub issue

Is your feature request related to a problem? Please describe. Its not necessarily always a node project that uses conventional commits, meaning that its not always possible nor needed to install @commitlint/config-conventional and use commitlint.config.js.

Describe the solution you’d like Just by adding the same pattern used for scopes would fix the issue, meaning that you could add to vscode settings:

conventionalCommits.types = [
    "chore",
    "docs"
]

Describe alternatives you’ve considered Adding @commitlint/config-conventional as global using npm, and creating a “useless” commitlint.config.js file that is inside .gitignore.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:5
  • Comments:24 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
vivaxycommented, Mar 21, 2021

@yi-Xu-0100 @GustavoFenilli I have a suggestion about the configuration. We can move default types into configuration.

The configuration could supports 3 types of input:

  1. For single language:
"conventionalCommits.commitTypes": "conventional-commit-types"
  1. For i18n:
"conventionalCommits.commitTypes": "@yi-xu-0100/conventional-commit-types-i18n"
  1. For custom types:
"conventionalCommits.commitTypes": [
  {
  	"type": "normal",
    "title": "with title",
    "description": "and description"
  },
  {
    "type": "only-title",
    "title": "only title"
  },
  {
    "type": "only-description",
    "title": "only description"
  },
  {
    "type": "only-type"
  }
]

Other attributes are ignored

It seems straightforward and keep the configuration as simple as possible. What do you think? 😃

2reactions
vivaxycommented, Mar 22, 2021

@yi-Xu-0100

Yes. I agree with your ideas:

  1. The default value is "@yi-xu-0100/conventional-commit-types-i18n".
  2. The default language is en.
  3. The custom configuration overrides all of the default values.

About the reuse of default values:

Is it possible to introduce extends property like eslint config or commitlint config? I’ll try to dig more information about this idea.

Read more comments on GitHub >

github_iconTop Results From Across the Web

conventional commit messaging - Conventional Commits
A specification for adding human and machine readable meaning to commit messages. ... Others: commit types other than fix: and feat: are allowed, ......
Read more >
Questions about conventional commit messages in git
I'm trying to adapt to conventional commit messages, described in this article. Here's a snippet from the article: Allowed <type> values: feat ( ......
Read more >
Conventional Commits - DEV Community ‍ ‍
Types of commit: feat: Add a new feature to the codebase (MINOR in semantic versioning). fix: Fix a bug (equivalent to a PATCH...
Read more >
Conventional Commits | Dev Cheatsheets - Michael Currin
A prefix for the commit message describing the type of the change. Type values allowed. This should be only one of the types...
Read more >
Commitlint: Write more organized code - LogRocket Blog
But, if your experience is anything like mine, it's possible that when ... yarn husky add .husky/commit-msg 'yarn commitlint --edit $1'.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found