Skip to content

Instantly share code, notes, and snippets.

@elevenpassin
Created September 28, 2021 05:39
Show Gist options
  • Save elevenpassin/b2d99cf6c90787934488d9c572fb51ec to your computer and use it in GitHub Desktop.
Save elevenpassin/b2d99cf6c90787934488d9c572fb51ec to your computer and use it in GitHub Desktop.
A simple but useful extension to config conventional and commitlint defaults.
const configConventional = require('@commitlint/config-conventional')
const customConventionalConfig = {
...configConventional,
}
customConventionalConfig.rules['type-enum'] = [
2,
'always',
[
'setup',
...customConventionalConfig.rules['type-enum'][2],
]
]
customConventionalConfig.prompt.questions.type.enum.setup = {
description:
'Changes that are made to the foundations of the project, aka webpack, eslint, prettier, commit hooks or introducing any new libraries etc',
title: 'Setup',
emoji: '💅',
}
module.exports = customConventionalConfig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment