Skip to content

Commit

Permalink
thjs-122: * commitlint config
Browse files Browse the repository at this point in the history
  • Loading branch information
v0ldemar01 committed Jun 10, 2024
1 parent 4e5bbe7 commit dcc3faa
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions commitlint.config.ts
Original file line number Diff line number Diff line change
@@ -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(
Expand All @@ -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];
}

Expand Down

0 comments on commit dcc3faa

Please sign in to comment.