eslint-github-bot icon indicating copy to clipboard operation
eslint-github-bot copied to clipboard

Respecting the optional scope in Conventional Commits

Open kecrily opened this issue 3 years ago • 3 comments
trafficstars

The Pull Request section of the ESLint documentation explicitly mentions that

All ESLint projects follow Conventional Commits for our commit messages[^1].

The convention for Conventional Commits is

<type>[optional scope]: <description>

[optional body]

[optional footer(s)]

However, ESLint Bot doesn't recognize the scope part of the commit message, so contributors who are already used to Conventional Commits have to modify the commit message to remove the scope part and recommit.

This caused some trouble. ESLint uses, but not exclusively, Conventional Commits

[^1]: Pull Requests - ESLint - Pluggable JavaScript Linter

kecrily avatar Aug 03 '22 12:08 kecrily

Yeah, unfortunately it needs to be this way for now. It’s not just that the bot needs to change, it’s the release process in general that doesn’t understand conventional commits scopes. We are looking at some alternatives but for now we can’t support scopes in commit messages.

nzakas avatar Aug 04 '22 01:08 nzakas

Why not just use commitlint?

Commitlint would also state exactly what's wrong with the commit message. The current process is kind of opaque and was a head scratcher for me since I write conventional commit messages every day, so my commit message adhered to the spec but I had no idea what eslint-github-bot didn't like about it.

jedwards1211 avatar Oct 17 '22 16:10 jedwards1211

@jedwards1211 please see the preceding comment. It’s our whole tooling system that would need to change, not just the bot commit check.

nzakas avatar Oct 17 '22 20:10 nzakas