1

I am trying to ignore the case in commitlint, but unfortunately there is not enough documentation how to ignore a specific rule.

I tried to add and allow all cases always in the subject-case rule, but this won't allow mixed sentences like (sentence-case and camel-case in one subject)

git commit -m "feat(auth): New userModel"

My configuration file:

import type { UserConfig } from '@commitlint/types';

const Configuration: UserConfig = {
  extends: ['@commitlint/config-conventional'],
  rules: {
    'subject-case': [
      2,
      'always',
      [
        'lower-case',
        'upper-case',
        'camel-case',
        'kebab-case',
        'pascal-case',
        'sentence-case',
        'snake-case',
        'start-case',
      ]
    ]
  }
};

module.exports = Configuration;

Hugo B.
  • 471
  • 1
  • 8
  • 23

1 Answers1

0

Keep the config as below,

const Configuration: UserConfig = {
  extends: ['@commitlint/config-conventional'],
  rules: {
    'subject-case': [
      2,
      'never',
      [
        'upper-case',
        'pascal-case',
        'start-case',
      ]
    ]
  }
};

Saravanan Rajaraman
  • 1,029
  • 2
  • 12
  • 25