Skip to content

feat: choice nested eemoji rule apply mode {scope}, {subject} or boths #31

Description

@pabloaugusto

Its primordial an option make nested eemoji rule only be applied to the {scope} context. The actual behavior is to be applied to any keyword (at any position) in the context of {scope} +{subject}.

At my example, we can see how it can make a mess in git repo icons and brings wrong information.

Maybe you can create a new context {scope} and add it to config possibilities extending format options.
Or, forgetting BDUF and concentrating only on this feat, you can create a simple additional option on nested emoji to control if should be applied to {subject} context or not.

Context options

  • subject: apply only to {subject}
  • scope: apply only to {scope}
  • all: apply to {subject} and {scope} (it how actually woks)

example idea:

export default defineDefaultConfig({
	format: '{emoji} {type}: {subject}',
        nest-context: 'subject|scope|all'
})

My actual scenario example

Example eemoji config:

chore: {
	'.': '🗑️',
	'release': '🔖',
	'cleanup': '🧹',
	'license': '📜',
	'deps': '📦',
	'lint': '🧼',
	'readme': '📕,📗,📘,📙'

Example commit:

git commit -m 'chore(my-package): maybe in future we need bump some deps'

Expected return:

[main 96301a1] 🗑️ chore(my-package): maybe in future we need bump some deps

received return at this moment:

[main 96301a1] 📦 chore(my-package): maybe in future we need bump some deps

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions