import { RuleConfigSeverity } from '@commitlint/types' ; import type { LintOptions , QualifiedRules } from '@commitlint/types' ; import gitmojiPlugin from 'commitlint-plugin-gitmoji' ; import gitmojiParserOpts from '@gitmoji/parser-opts' ; import commitTypes from '@gitmoji/commit-types' ; const { Error } = RuleConfigSeverity ; const rules = { 'start-with-gitmoji' : [ Error , 'always' ] , 'type-enum' : [ Error , 'always' , commitTypes ] , 'body-leading-blank' : [ Error , 'always' ] , 'footer-leading-blank' : [ Error , 'always' ] , 'header-max-length' : [ Error , 'always' , 72 ] , 'scope-case' : [ Error , 'always' , 'lower-case' ] , 'subject-empty' : [ Error , 'never' ] , 'subject-full-stop' : [ Error , 'never' ] , 'type-case' : [ Error , 'always' , 'lower-case' ] , 'type-empty' : [ Error , 'never' ] , } ; const parserPreset = { parserOpts : gitmojiParserOpts , plugins : { gitmoji : gitmojiPlugin , } , } ; export default { rules , parserPreset , plugins : [ gitmojiPlugin ] , } ;