Reputation: 503
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;
Upvotes: 4
Views: 6566
Reputation: 1033
Keep the config as below,
const Configuration: UserConfig = {
extends: ['@commitlint/config-conventional'],
rules: {
'subject-case': [
2,
'never',
[
'upper-case',
'pascal-case',
'start-case',
]
]
}
};
Upvotes: 1