diff --git a/docs/reference-configuration.md b/docs/reference-configuration.md index 06aff5fa91..1e1478e077 100644 --- a/docs/reference-configuration.md +++ b/docs/reference-configuration.md @@ -27,13 +27,13 @@ type Config = { */ rules?: {[name: string]: Rule}; /* - * Custom list of Messages to Ignore, string values will be compiled as RegExp + * Functions that return true if commitlint should ignore the given message. */ - ignoredMessages?: Array boolean>; + ignores?: ((message: string) => boolean)[]; /* - * If this is true we will not use any of the default is-ignored rules + * Whether commitlint uses the default ignore rules. */ - disableDefaultIgnoredMessages?: boolean; + defaultIgnores?: boolean; } const Configuration: Config = { @@ -59,18 +59,15 @@ const Configuration: Config = { 'type-enum': [2, 'always', ['foo']] }, /* - * These RegExp and functions are used to ignore messages that shouldn't be linted + * Functions that return true if commitlint should ignore the given message. */ - ignoredMessages: [ - '^Entire Message to Ignore$', - /^(ci|github):/, + ignores: [ (commit) => commit === '' ], /* - * If this is true then the default ignores like `Merge commit` are not ignored - * and will cause commitlint to fail + * Whether commitlint uses the default ignore rules. */ - disableDefaultIgnoredMessages: true + defaultIgnores: true }; module.exports = Configuration;