From dcc3faaa3ccb0fe3e2c92cb351b02bdfc25d9d18 Mon Sep 17 00:00:00 2001 From: Volodymyr Minchenko Date: Mon, 10 Jun 2024 21:30:03 +0300 Subject: [PATCH] thjs-122: * commitlint config --- commitlint.config.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/commitlint.config.ts b/commitlint.config.ts index d19c4530..dde13f52 100644 --- a/commitlint.config.ts +++ b/commitlint.config.ts @@ -1,6 +1,6 @@ -import { UserConfig } from '@commitlint/types'; +import { type UserConfig } from '@commitlint/types'; -import { ProjectPrefix } from './project.config'; +import { ProjectPrefix } from './project.config.js'; const COMMIT_MODIFIERS = ['+', '*', '-']; const COMMIT_MESSAGE_REGEXP = new RegExp( @@ -22,18 +22,18 @@ Examples: - production: - comments in ui/ux homework`; const configuration: UserConfig = { + defaultIgnores: true, parserPreset: { parserOpts: { - headerPattern: COMMIT_MESSAGE_REGEXP, - headerCorrespondence: ['prefix', 'modifier', 'description'] + headerCorrespondence: ['prefix', 'modifier', 'description'], + headerPattern: COMMIT_MESSAGE_REGEXP } }, - defaultIgnores: true, plugins: [ { rules: { 'commit-message-match': ({ header }) => { - if (!COMMIT_MESSAGE_REGEXP.test(header)) { + if (!COMMIT_MESSAGE_REGEXP.test(header as string)) { return [false, COMMIT_MESSAGE_MATCH_RULE_MESSAGE]; }