Skip to content

用 JSON 格式是不是 emoji 就显示不出来了? #76

Answered by Zhengqbbb
Hellager asked this question in Q&A
Discussion options

You must be logged in to vote

.commitlintrc(need "prompt" key)

{
  "prompt": {
    "types": [
      { "value": "feat", "name": "feat:     A new feature", "emoji": ":sparkles:" }
    ],
    "useEmoji": true
  }
}

But if u project is esm project type: module. u can use .cjs configure like commitlint.config.cjs| .commitlintrc.cjs | cz.config.cjs

/** @type {import('cz-git').UserConfig} */
module.exports = {
  prompt: {
    types: [
      { value: "feat", name: "feat:     A new feature", emoji: ":sparkles:" },
    ],
    useEmoji: true
  },
};

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Hellager
Comment options

Answer selected by Hellager
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants